Skip to content
Snippets Groups Projects
  1. Sep 19, 2023
  2. Aug 22, 2023
    • Krzysztof Gogolewski's avatar
      Testsuite cleanup · 52a6d868
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      - Remove misleading help text in perf_notes, ways are not metrics
      - Remove no_print_summary - this was used for Phabricator
      - In linters tests, run 'git ls-files' just once.
        Previously, it was called on each has_ls_files()
      - Add ghc-prim.cabal to gitignore, noticed in #23726
      - Remove ghc-prim.cabal, it was accidentally committed in 524c60c8
      52a6d868
  3. Aug 09, 2023
    • sheaf's avatar
      Compute all emitted diagnostic codes · 0ef1d8ae
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit introduces in GHC.Types.Error.Codes the function
      
        constructorCodes :: forall diag. (...) => Map DiagnosticCode String
      
      which computes a collection of all the diagnostic codes that correspond
      to a particular type. In particular, we can compute the collection of
      all diagnostic codes emitted by GHC using the invocation
      
        constructorCodes @GhcMessage
      
      We then make use of this functionality in the new "codes" test which
      checks consistency and coverage of GHC diagnostic codes.
      It performs three checks:
      
        - check 1: all non-outdated GhcDiagnosticCode equations
          are statically used.
        - check 2: all outdated GhcDiagnosticCode equations
          are statically unused.
        - check 3: all statically used diagnostic codes are covered by
          the testsuite (modulo accepted exceptions).
      0ef1d8ae
  4. Jul 08, 2023
  5. Jun 02, 2023
  6. Apr 27, 2023
    • Cheng Shao's avatar
      testsuite: add the req_ghc_with_threaded_rts predicate · aa6afe8a
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch adds the req_ghc_with_threaded_rts predicate to the
      testsuite to assert the platform has threaded RTS, and mark some tests
      as req_ghc_with_threaded_rts. Also makes ghc_with_threaded_rts a
      config field instead of a global variable.
      aa6afe8a
  7. Apr 11, 2023
  8. Jan 18, 2023
    • Sylvain Henry's avatar
      testsuite: req_smp --> req_target_smp, req_ghc_smp · 06036d93
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      See #22630 and !9552
      
      This commit:
       - splits req_smp into req_target_smp and req_ghc_smp
       - changes the testsuite driver to calculate req_ghc_smp
       - changes a handful of tests to use req_target_smp instead of req_smp
       - changes a handful of tests to use req_host_smp when needed
      
      The problem:
       - the problem this solves is the ambiguity surrounding req_smp
       - on master req_smp was used to express the constraint that the program
       being compiled supports smp _and_ that the host RTS (i.e., the RTS used
       to compile the program) supported smp. Normally that is fine, but in
       cross compilation this is not always the case as was discovered in #22630.
      
      The solution:
       - Differentiate the two constraints:
         - use req_target_smp to say the RTS the compiled program is linked
         with (and the platform) supports smp
         - use req_host_smp to say the RTS the host is linked with supports smp
      
      WIP: fix req_smp (target vs ghc)
      
      add flag to separate bootstrapper
      
      split req_smp -> req_target_smp and req_ghc_smp
      
      update tests smp flags
      
      cleanup and add some docstrings
      
      only set ghc_with_smp to bootstrapper on S1 or CC
      
      Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1
      and cross compiling
      
      test the RTS in config/ghc not hadrian
      
      re-add ghc_with_smp
      
      fix and align req names
      
      fix T11760 to use req_host_smp
      
      test the rts directly, avoid python 3.5 limitation
      
      test the compiler in a try block
      
      align out of tree and in tree withSMP flags
      
      mark failing tests as host req smp
      
      testsuite: req_host_smp --> req_ghc_smp
      
      Fix ghc vs host, fix ghc_with_smp leftover
      06036d93
  9. Oct 17, 2022
  10. Aug 26, 2022
  11. Jul 17, 2022
  12. Apr 25, 2022
    • Ben Gamari's avatar
      testsuite: Cabalify ghc-config · 6c7a4913
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      To ensure that the build benefits from Hadrian's usual logic for building
      packages, avoiding #21409.
      
      Closes #21409.
      6c7a4913
    • Ben Gamari's avatar
      testsuite: More robust library way detection · 18e5103f
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously `test.mk` would try to determine whether the dynamic,
      profiling, and vanilla library ways are available by searching for
      `PrimOpWrappers.{,dyn_,p_}hi` in directory reported by `ghc-pkg field
      ghc-prim library-dirs`. However, this is extremely fragile as
      there is no guarantee that there is only one library directory. To
      handle the case of multiple `library-dirs` correct we would
      have to carry out the delicate task of tokenising the directory list (in
      shell, no less).
      
      Since this isn't a task that I am eager to solve, I have rather moved
      the detection logic into the testsuite driver and instead perform a test
      compilation in each of the ways. This should be more robust than the
      previous approach.
      
      I stumbled upon this while fixing #20579.
      18e5103f
  13. Apr 22, 2022
  14. Apr 06, 2022
  15. Mar 17, 2022
  16. Feb 25, 2022
    • Matthew Pickering's avatar
      Move linters into the tree · 6555b68c
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This MR moves the GHC linters into the tree, so that they can be run directly using Hadrian.
      
      * Query all files tracked by Git instead of using changed files, so that we can run the exact same linting step locally and in a merge request.
      * Only check that the changelogs don't contain TBA when RELEASE=YES.
      * Add hadrian/lint script, which runs all the linting steps.
      * Ensure the hlint job exits with a failure if hlint is not installed (otherwise we were ignoring the failure). Given that hlint doesn't seem to be available in CI at the moment, I've temporarily allowed failure in the hlint job.
      * Run all linting tests in CI using hadrian.
      6555b68c
  17. Feb 09, 2022
  18. Feb 08, 2022
  19. Feb 04, 2022
    • Matthew Pickering's avatar
      testsuite: Run testsuite dependency calculation before GHC is built · 62d670eb
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The main motivation for this patch is to allow tests to be added to the
      testsuite which test things about the source tree without needing to
      build GHC. In particular the notes linter can easily start failing and
      by integrating it into the testsuite the  process of observing these
      changes is caught by normal validation procedures rather than having to
      run the linter specially.
      
      With this patch I can run
      
      ```
      ./hadrian/build test --flavour=devel2  --only="uniques"
      ```
      
      In a clean tree to run the checkUniques linter without having to build
      GHC.
      
      Fixes #21029
      62d670eb
  20. Feb 01, 2022
  21. Dec 21, 2021
  22. Dec 18, 2021
    • Matthew Pickering's avatar
      ci: Use correct metrics baseline · e04878b0
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      It turns out there was already a function in the CI script to correctly
      set the baseline for performance tests but it was just never called. I
      now call it during the initialisation to set the correct baseline.
      
      I also made the make testsuite driver take into account the
      PERF_BASELINE_COMMIT environment variable
      
      Fixes #20811
      e04878b0
  23. Dec 01, 2021
  24. Sep 23, 2021
  25. Jun 05, 2021
    • Shayne Fletcher's avatar
      Make 'count-deps' a ghc/util standalone program · 1713cbb0
      Shayne Fletcher authored and Marge Bot's avatar Marge Bot committed
      - Move 'count-deps' into 'ghc/utils' so that it can be called standalone.
      - Move 'testsuite/tests/parser/should_run/' tests 'CountParserDeps' and
      'CountAstDeps' to 'testsuite/tests/count-deps' and reimplement in terms
      of calling the utility
      - Document how to use 'count-deps' in 'ghc/utils/count-deps/README'
      1713cbb0
  26. Apr 22, 2021
  27. Apr 07, 2021
    • Sylvain Henry's avatar
      Remove dynamic-by-default (#16782) · d014ab0d
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Dynamic-by-default was a mechanism to automatically select the -dynamic
      way for some targets.
      
      It was implemented in a convoluted way: it was defined as a flavour
      option, hence it couldn't be passed as a global settings (which are
      produced by `configure` before considering flavours), so a build system
      rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that
      deriveConstants could infer it.
      
      * Make build system has it disabled for 8 years (951e28c0)
      * It has never been implemented in Hadrian
      * Last time someone tried to enable it 1 year ago it didn't work (!2436)
      * Having this as a global constant impedes making GHC multi-target (see !5427)
      
      This commit fully removes support for dynamic-by-default. If someone
      wants to reimplement something like this, it would probably need to move
      the logic in the compiler.
      
      (Doing this would probably need some refactoring of the way the compiler
      handles DynFlags: DynFlags are used to store and to pass enabled ways to
      many parts of the compiler. It can be set by command-line flags, GHC
      API, global settings. In multi-target GHC, we will use DynFlags to load
      the target platform and its constants: but at this point with the
      current DynFlags implementation we can't easily update the existing
      DynFlags with target-specific options such as dynamic-by-default without
      overriding ways previously set by the user.)
      d014ab0d
  28. Mar 20, 2021
  29. Dec 18, 2020
    • Ben Gamari's avatar
      testsuite: Fix two shell quoting issues · c53b38dd
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Fixes two ancient bugs in the testsuite driver makefiles due to
      insufficient quoting. I have no idea how these went unnoticed for so
      long.
      
      Thanks to @tomjaguarpaw for testing.
      c53b38dd
  30. Nov 04, 2020
  31. Nov 03, 2020
  32. Aug 19, 2020
    • Ben Gamari's avatar
      testsuite: Only run llvm ways if llc is available · aa4b744d
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      As noted in #18560, we previously would always run the LLVM ways since
      `configure` would set `SettingsLlcCommand` to something non-null when
      it otherwise couldn't find the `llc` executable. Now we rather probe for
      the existence of the `llc` executable in the testsuite driver.
      
      Fixes #18560.
      aa4b744d
  33. Aug 18, 2020
  34. Aug 14, 2020
  35. Jul 23, 2020
  36. Jul 15, 2020
  37. Jun 17, 2020
    • Sylvain Henry's avatar
      Update testsuite · f817d816
      Sylvain Henry authored
      * support detection of slow ghc-bignum backend (to replace the detection
        of integer-simple use). There are still some test cases that the
        native backend doesn't handle efficiently enough.
      
      * remove tests for GMP only functions that have been removed from
        ghc-bignum
      
      * fix test results showing dependent packages (e.g. integer-gmp) or
        showing suggested instances
      
      * fix test using Integer/Natural API or showing internal names
      f817d816
Loading