haskell.nix/test
Hamish Mackenzie a9b01221dd
Replace collectRunComponents with haskellLib.check (#316)
This change replaces `passthru.run` and `collectRunComponents` with
`haskellLib.check` and `$pkg.checks`.

Uses `ln -s` instead of `cp` for DLLs to avoid duplicating them.

Adds features to help debugging eval issues with haskell.nix/release.nix.
The ifdInputLevel can be set to limit the jobs included to control
how much work is done at the eval stage when looking for issues.

Reduce CI times by excluding older ghc versions from haskellNixRoots
(GHC 8.6.3 and 8.6.4)

Sets `preferLocalBuild=false` on `callCabalProjectToNix` and `callStackToNix`
to ensure they are cached on hydra for both Linux and macOS.

Fix `data-dir:` when cleaning components.
`normalizeRelativeDir` adds a slash on to the end of `dataDir`.
Adding another one here results in `//` and files are left out by
mistake.
2019-11-29 23:28:47 +13:00
..
buildable Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
builder-haddock Run the cross compiled tests on wine (#317) 2019-11-20 13:47:15 +13:00
cabal-22 Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
cabal-simple Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
cabal-simple-prof Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
cabal-source-repo Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
cabal-sublib Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
call-cabal-project-to-nix Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
call-stack-to-nix Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
exe-only Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
fully-static Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
ghc-options Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
project-flags Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
setup-deps Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
shell-for Run the cross compiled tests on wine (#317) 2019-11-20 13:47:15 +13:00
shell-for-setup-deps Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
snapshots Run the cross compiled tests on wine (#317) 2019-11-20 13:47:15 +13:00
stack-simple Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
with-packages Run the cross compiled tests on wine (#317) 2019-11-20 13:47:15 +13:00
default.nix Replace collectRunComponents with haskellLib.check (#316) 2019-11-29 23:28:47 +13:00
README.md Add cross-compiled musl libc builds of tests (#157) 2019-07-02 18:25:40 +10:00
regen.nix Move all of haskell.nix into haskell-nix (#289) 2019-11-05 12:50:50 +13:00
tests.sh shellFor: Fix bug where packages were not excluded from the env (#285) 2019-11-01 20:08:31 +10:00
unit.nix tests: Add unit tests for library functions 2019-01-30 15:38:38 +10:00
util.nix tests: Add more tests for "all" component merging 2019-02-07 09:39:12 +08:00

Haskell infrastructure test cases

To build the test cases, run from the test directory:

nix-build --no-out-link default.nix

To run all tests (includes impure tests), use the script:

./tests.sh

Generated code

If you change the test Cabal files or need to regenerate the code with nix-tools, then see regen.nix. Run it like this:

$(nix-build --no-out-link regen.nix)