• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..26-Aug-2021-

IntegrationTests2/H26-Aug-2021-476343

UnitTests/H26-Aug-2021-7,9545,886

IntegrationTests2.hsH A D25-May-202167.4 KiB1,7511,436

MemoryUsageTests.hsH A D25-May-2021345 1611

README.mdH A D19-Apr-20201.2 KiB2822

SolverQuickCheck.hsH A D25-May-2021348 1711

UnitTests.hsH A D25-May-20214.1 KiB9785

test-cabal-installH A D19-Apr-2020242 107

test-cabal-install-userH A D19-Apr-2020227 96

README.md

1Integration Tests
2=================
3
4Each test is a shell script.  Tests that share files (e.g., `.cabal` files) are
5grouped under a common sub-directory of [IntegrationTests].  The framework
6copies the whole group's directory before running each test, which allows tests
7to reuse files, yet run independently.  A group's tests are further divided into
8`should_run` and `should_fail` directories, based on the expected exit status.
9For example, the test
10`IntegrationTests/exec/should_fail/exit_with_failure_without_args.sh` has access
11to all files under `exec` and is expected to fail.
12
13Tests can specify their expected output.  For a test named `x.sh`, `x.out`
14specifies `stdout` and `x.err` specifies `stderr`.  Both files are optional.
15The framework expects an exact match between lines in the file and output,
16except for lines beginning with "RE:", which are interpreted as regular
17expressions.
18
19[IntegrationTests.hs] defines several environment variables:
20
21* `CABAL` - The path to the executable being tested.
22* `GHC_PKG` - The path to ghc-pkg.
23* `CABAL_ARGS` - A common set of arguments for running cabal.
24* `CABAL_ARGS_NO_CONFIG_FILE` - `CABAL_ARGS` without `--config-file`.
25
26[IntegrationTests]: IntegrationTests
27[IntegrationTests.hs]: IntegrationTests.hs
28