summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/Test.hs
Commit message (Collapse)AuthorAgeFilesLines
* Hadrian: display command line above errors (#20490)Sylvain Henry2021-10-151-1/+0
|
* hadrian: avoid building check-{exact,ppr} and count-deps when the tests ↵Zubin Duggal2021-10-131-20/+34
| | | | | | don't need them hadrian: build optional dependencies with test compiler
* ci: test in-tree compiler in hadrianZubin Duggal2021-10-131-17/+20
|
* hadrian, testsuite: Teach Hadrian to query the testsuite driver for dependenciesZubin Duggal2021-10-131-2/+10
| | | | Issues #19072, #17728, #20176
* hadrian: Rework the verbosity levelsMatthew Pickering2021-09-281-1/+1
| | | | | | | | | | | | | Before we really only had two verbosity levels, normal and verbose. There are now three levels: Normal: Commands show stderr (no stdout) and minimal build failure messages. Verbose (-V): Commands also show stdout, build failure message contains callstack and additional information Diagnostic (-VV): Very verbose output showing all command lines and passing -v3 to cabal commands. -V is similar to the default verbosity from before (but a little more verbose)
* hadrian: Remove deprecated tracing functionsMatthew Pickering2021-09-281-1/+1
|
* testsuite: Pass CFLAGS to hsc2hs testsBen Gamari2021-09-231-0/+4
|
* Create absolute symlink for test executablesMatthew Pickering2021-08-131-1/+3
| | | | | | | This is necessary because the symlink needs to be created between two arbritary filepaths in the build tree, it's hard to compute how to get between them relatively. As this symlink doesn't end up in a bindist then it's fine for it to be absolute.
* Make 'count-deps' a ghc/util standalone programShayne Fletcher2021-06-051-1/+10
| | | | | | | | - 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'
* hadrian: Build check-ppr and check-exact using normal hadrian rules when in-treeMatthew Pickering2021-05-191-23/+21
| | | | Fixes #19606 #19607
* hadrian: Fix dynamic+debug flag combination for check-ppr executableMatthew Pickering2021-05-121-2/+2
|
* Hadrian: build check-* with -Wall/-WerrorSylvain Henry2021-04-301-1/+1
| | | | Otherwise CI fails only with make build system.
* hadrian: Don't try to build iserv-prof if we don't have profiled librariesMatthew Pickering2021-04-071-6/+19
| | | | Workaround for #19624
* GHC Exactprint main commitAlan Zimmerman2021-03-201-12/+19
| | | | | | | | Metric Increase: T10370 parsing001 Updates haddock submodule
* hadrian: build check-ppr dynamic if GHC is build dynamicStefan Schulze Frielinghaus2020-07-131-1/+4
| | | | Fixes #18361
* hadrian: link check-ppr against debugging RTS if ghcDebuggedStefan Schulze Frielinghaus2020-07-071-1/+6
|
* hadrian: Eliminate redundant .exe from GHC pathBen Gamari2020-03-221-1/+1
| | | | | | | | Previously we were invoking: bash -c "c:/GitLabRunner/builds/eEQrxK4p/0/ghc/ghc/toolchain/bin/ghc.exe.exe testsuite/mk/ghc-config.hs -o _build/test/bin/ghc-config.exe"
* hadrian: improve dependency tracking for the check-* programsAlp Mestanogullari2020-03-131-7/+21
| | | | | | | | | | | | | | | | | | | | | | | The code in Rules.Register responsible for finding all the build artifacts that Cabal installs when registering a library (static/shared libs, .hi files, ...) was looking in the wrong place. This patch fixes that logic and makes sure we gather all those artifacts in a list to declare that the rule for a given `.conf` file, our proxy for "Hadrian, please install this package in the package db for this stage", also produces those artifacts under the said package database. We also were completely missing some logic to declare that the check-* programs have dependencies besides their source code, at least when testing an in-tree compiler. Finally, this patch also removes redundant packages from 'testsuitePackages', since they should already be covered by the stage<N>Packages lists from Settings.Default. With this patch, after a complete build and freezing stage 1, a change to `compiler/parser/Parser.y` results in rebuilding the ghc lib, reinstalling it, and rebuilding the few programs that depend on it, _including_ `check-ppr` and `check-api-annotations` (therefore fixing #17273).
* hadrian: build (and ship) iserv on WindowsAlp Mestanogullari2020-02-111-10/+8
|
* hadrian: Windows fixes (bindists, CI)Alp Mestanogullari2020-02-091-5/+5
| | | | | | | | | | | | | | | | | | | This commit implements a few Windows-specific fixes which get us from a CI job that can't even get as far as starting the testsuite driver, to a state where we can run the entire testssuite (but have test failures to fix). - Don't forget about a potential extension for the haddock program, when preparing the bindist. - Build the timeout program, used by the testsuite driver on Windows in place of the Python script used elsewhere, using the boot compiler. We could alternatively build it with the compiler that we're going to test but this would be a lot more tedious to write. - Implement a wrapper-script less installation procedure for Windows, in `hadrian/bindist/Makefile. - Make dependencies a bit more accurate in the aforementioned Makefile. - Update Windows/Hadrian CI job accordingly. This patch fixes #17486.
* Fix typos, via a Levenshtein-style correctorBrian Wignall2020-01-041-1/+1
|
* Hadrian: Invoke ghc0 via bash when running tests to fix #17362.Andreas Klebinger2019-10-231-1/+3
| | | | | | | | cmd uses RawCommand which uses Windows semantics to find the executable which sometimes seems to fail for unclear reasons. If we invoke ghc via bash then bash will find the ghc executable and the issue goes away.
* [hadrian] Rebuild programs on dynamicGhcPrograms/ghcProfiled changeArtem Pyanykh2019-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if you change these ^ flavour parameters, rebuilding is not triggered, since `programContext` doesn't set up a dependency on those values. Exposing these values via an oracle does set the dependency and properly triggers a rebuild of binaries. Several attempts to factor out these actions ended up in cyclic dependency here or there. I'm not absolutely happy with this variant either, but at least it works. ==== Issue repro: In UserSettings.hs: ``` dbgDynamic = defaultFlavour { name = "dbg-dynamic" , dynamicGhcPrograms = pure True, ... } dbgStatic = defaultFlavour { name = "dbg-static" , dynamicGhcPrograms = pure False ... } ``` Then in console: ``` $ hadrian/build.sh -j --flavour=dbg-dynamic ... does the build $ hadrian/build.sh -j --flavour=dbg-static ... does nothing, considers binaries up to date ```
* Hadrian: run the testsuite in Windows CI jobAlp Mestanogullari2019-07-231-4/+5
| | | | | | | | | | | | Since MR !1025 fixed the Windows build, allowing us to build a binary distribution, we can now run the testsuite in that CI job. This required fixing 'createFileLink': it should not try to create symlinks on Windows (that requires admin priviledges, which Hadrian can't assume). We now instead fall back to copying. This patch also removes some duplicated logic for iserv in the test rules, where we handle our dependency on the iserv binaries in a special way.
* Fix cyclic dependencies when using --configureAndrey Mokhov2019-06-251-4/+2
| | | | | | | | | | | This resolves #16809 (https://gitlab.haskell.org/ghc/ghc/issues/16809). This patch removes the unnecessary dependency on configure-generated flags `windowsHost`, `osxHost` and `iosHost`, using the information provided by the module `System.Info` instead. We also take care to use the `CrossCompiling` flag generated by the configure script only after the latter had a chance to run.
* testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk'Alp Mestanogullari2019-06-111-1/+1
| | | | | | | | | | | | | Make/shell variable names which contain dashes can cause problems under some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk that I made overridable (by Hadrian) in ba0aed2e was working as expected when our Hadrian/Linux job was based off the deb8 Docker image, but broke when I switched the job to use our deb9-based image, in 3d97bad6. The exact circumstances/tool versions that trigger this problem are unknown, but changing the variable's name to 'ghc_config_mk' lets us work around the issue. This fixes the annth_compunits and annth_make test failures that showed up when we switched the Hadrian/Linux job to use the deb9 environment.
* Hadrian: override $(ghc-config-mk), to prevent redundant config generationAlp Mestanogullari2019-05-061-0/+8
| | | | | | | | | | | | This required making the 'ghc-config-mk' variable overridable in testsuite/mk/boilerplate.mk, and then making use of this in hadrian to point to '<build root>/test/ghcconfig' instead, which is where we always put the test config. Previously, we would build ghc-config and run it against the GHC to be tested, a second time, while we're running the tests, because some include testsuite/mk/boilerplate.mk. This was causing unexpected output failures.
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-151-1/+1
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* Hadrian: various improvements around the 'test' ruleAlp Mestanogullari2019-03-081-45/+98
| | | | | | | | | | | | | | - introduce a -k/--keep-test-files flag to prevent cleanup - add -dstg-lint to the options that are always passed to tests - infer library ways from the compiler to be tested instead of getting them from the flavour (like make) - likewise for figuring out whether the compiler to be tested is "debugged" - specify config.exeext - correctly specify config.in_tree_compiler, instead of always passing True - fix formatting of how we pass a few test options - add (potential) extensions to check-* program names - build check-* programs with the compiler to be tested - set TEST_HC_OPTS_INTERACTIVE and PYTHON env vars when running tests
* Build and copy libffi shared libraries correctly and enable dynamically ↵David Eichmann2019-02-221-5/+1
| | | | | | | | | | | | | | linking ghc. Test Plan: Ensure build environment does NOT have a system libffi installed (you may want to use a nix environment). Then `hadrian/build.sh -c --flavour=default` Reviewers: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15837
* Revert dynamically linking ghc.David Eichmann2018-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | Building a dynamically linked ghc is broken do to incorrectly building and installing libffi. This disables building a dynamically linked ghc and ghc-iserv-dyn while keeping most of the code in the relevant commits: 79d5427e1 and 89fa34ecd Test Plan: Ensure build environment does NOT have a system libffi installed (you may want to use a nix environment). Then `hadrian/build.sh -c --flavour=default`. Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter GHC Trac Issues: #15837 Differential Revision: https://phabricator.haskell.org/D5430
* Hadrian: include 'findPtr' via find-ptr cabal flagAlec Theriault2018-12-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the latest in the 'findPtr' saga. See * 900c47f88784b91517c00be3e1087322e62f698e * 561748cb507505bd5b7bd76bdc57796d896b62a2 for the previous attempts. The problem with re-using the 'debug' cabal flag for the purpose of forcing inclusion of 'findPtr' occurs when 'debug' is one of the RTS ways, but RTS is not being compiled with '-DDEBUG': * the 'debug' flag gets passed to cabal, signalling to build 'rts' with the debug flavour, but also forcing inclusion of the 'findPtr'/'_findPtr' symbol * since '-DDEBUG' isn't enabled, that symbol doesn't show up in the libraries, so executable that depend on 'rts' (everything) will end up always requiring 'findPtr'/'_findPtr' but 'rts' won'y provide it! The fix is simple: create a a new 'find-ptr' cabal-flag whose only purpose is forcing '-Wl,-u,findPtr'/'-Wl,-u,_findPtr'. Then, enable that flag when the RTS is being compiled with '-DDEBUG' Test Plan: ./hadrian/build.sh -c # on mac Reviewers: alpmestan, snowleopard, bgamari, erikd, simonmar, Phyx Reviewed By: alpmestan, snowleopard, Phyx Subscribers: Phyx, rwbarton, carter GHC Trac Issues: #15956 Differential Revision: https://phabricator.haskell.org/D5404
* Hadrian: Print all testsuite output to stdoutAndrey Mokhov2018-12-011-1/+4
| | | See https://ghc.haskell.org/trac/ghc/ticket/15951
* hadrian/test: Don't depend upon iserv on WindowsBen Gamari2018-12-011-1/+3
| | | | | Iserv is not supported on Windows. This fixes #15950 but this whole situation feels awfully fragile to me.
* hadrian: make it possible to run the testsuite with quickest and quickAlp Mestanogullari2018-11-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | More generally, we so far assumed that the testsuite would be executed with a flavour that's as comprehensive as perf in terms of available RTS and library flavours (at least vanilla + dynamic + prof). This would manifest itself concretely by needing 3 "ways" of the iserv program, unconditionally. We now only require the ways among vanilla, dynamic and prof that we can find in our current Flavour's rtsWays. Test Plan: hadrian/build.sh --flavour={quick, quickest} test now goes through (with a few failing tests, of course). Reviewers: bgamari, tdammers Reviewed By: tdammers Subscribers: mpickering, RyanGlScott, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5355
* hadrian: build ghc-iserv-dynDavid Eichmann2018-11-141-1/+1
| | | | | | | | | | | | | ... in addition to ghc-iserv and ghc-iserv-prof, as it is required to get 10+ tests to pass Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: alpmestan, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5327
* hadrian: build ghc-iserv-prof in addition to ghc-iservAlp Mestanogullari2018-11-011-5/+6
| | | | | | | | | | | | | | | | | | | As it is required for 10+ tests. Hadrian didn't give us a chance to build a given executable in vanilla and profiling, simultaneously, under two different names. This patch implements support for this in general and applies it to ghc-iserv[-prof]. Test Plan: scc001 fails without this patch, passes with it. Reviewers: snowleopard, bgamari Reviewed By: bgamari Subscribers: simonpj, ndmitchell, simonmar, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5255
* Add 'hadrian/' from commit '45f3bff7016a2a0cd9a5455a882ced984655e90b'Ben Gamari2018-10-231-0/+124
| | | | | | git-subtree-dir: hadrian git-subtree-mainline: 575b35f4cdc18045bccd42d341d6f25d95c0696c git-subtree-split: 45f3bff7016a2a0cd9a5455a882ced984655e90b
* Remove Hadrian submoduleBen Gamari2018-10-231-7/+0
|
* Bump hadrian submoduleBen Gamari2018-08-051-21/+5
|
* Bump hadrian submoduleBen Gamari2018-06-121-5/+21
|
* Update hadrian submoduleBen Gamari2018-06-071-16/+6
|
* Update Hadrian submoduleAndrey Mokhov2018-04-261-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Link to Quick Start guide * Update README.md (hadrian/578) * Fix AppVeyor (hadrian/577) * Fix CircleCI * Generic library rules (hadrian/571) * Fix lint error (hadrian/575) * Fix missing libHSghc-8.5-0.a (hadrian/574) * Fix the path to touchy (hadrian/572) * Fix integer-gmp build (hadrian/568) * Undo fs*.h workaround * Fix copying of fs*.h files during RTS registration (hadrian/566) * Fix Windows build, improve error reporting (hadrian/565) * Fix Windows build (hadrian/563) * Fix boot and configure on AppVeyor (hadrian/561) * Preliminary bindist (hadrian/558, hadrian/555) * Unregister stage0 package first if it needs to be cloned (hadrian/552) * Fix Circle CI (hadrian/553) * Fix warnings (hadrian/547) * Merge pull request hadrian/542 from Mistuke/fix-specific-file * Use Cabal directly in place of ghc-cabal + make build root configurable (hadrian/531) * Add user-defined flavour example for turning off dynamic linking (hadrian/535) * Add clean routines for fs (hadrian/533) * Add 'git' to nativeBuildInputs in shell.nix (hadrian/530) * Add extra include paths when invoking ghc-cabal (hadrian/526) * Merge pull request hadrian/528 from snowleopard/bump-cabal * Merge pull request hadrian/521 from snowleopard/drop-chmod * Change permission bits for build.cabal.sh, fixes hadrian/517 (hadrian/520) * Pin nixpkgs and all-cabal-hashes in shell.nix (hadrian/511) * Add troubleshooting section
* Update Hadrian submoduleAndrey Mokhov2018-02-241-22/+8
| | | | | | | | | | | | | | | * Make shell.nix less broken (hadrian/510) * Add --configure flag to the script * Undo iserv changes (hadrian/507) * Fix ghc-cabal: Parsec modules are now found in libraries/parsec/src (hadrian/506) * Move a bunch of types into dedicated modules (hadrian/502) * Add --quickjump to Haddock (hadrian/505) * Add iserv library (hadrian/504) * Merge pull request hadrian/503 from snowleopard/angerman-patch-1 * Merge pull request hadrian/500 from snowleopard/runtime-deps * Fix Hadrian after Cabal changes (hadrian/498) * Drop custom logic for Scav_thr and Evac_thr (hadrian/497) * Fix Haddock (hadrian/496)
* Bump hadrian submoduleBen Gamari2018-01-261-18/+23
|
* Add hadrian as a submoduleBen Gamari2017-12-081-0/+21
| | | | | It will remain a submodule until we are ready to merge Hadrian into the tree.
* Rip out hadrian subtreeBen Gamari2017-12-081-72/+0
| | | | | Sadly subtrees haven't worked quite as well as we would have liked for developers. See Hadrian #440.
* Merge commit '7b0b9f603bb1215e2b7af23c2404d637b95a4988' as 'hadrian'Andrey Mokhov2017-11-061-0/+72