Switch branches/tags
ghc-7.6.3-release ghc-7.6.2-release ghc-7.6.1-release dist/cabal-install-v1.20.0.6 checkpoint cabal-install_merged cabal-install-v1.24.0.2 cabal-install-v1.24.0.1 cabal-install-v1.24.0.0 cabal-install-v1.22.9.0 cabal-install-v1.22.8.0 cabal-install-v1.22.7.0 cabal-install-v1.22.6.0 cabal-install-v1.22.5.0 cabal-install-v1.22.4.0 cabal-install-v1.22.3.0 cabal-install-v1.22.2.0 cabal-install-v1.22.0.1 cabal-install-v1.22.0.0 cabal-install-v1.22.0.0-rc cabal-install-v1.20.2.0 cabal-install-v1.20.1.0 cabal-install-v1.20.0.5 cabal-install-v1.20.0.4 cabal-install-v1.20.0.4-rc cabal-install-v1.20.0.3 cabal-install-v1.20.0.2 cabal-install-v1.20.0.1 cabal-install-v1.20.0.0 cabal-install-v1.20.0.0-rc2 cabal-install-v1.20.0-rc cabal-install-v1.18.2.0 cabal-install-v1.18.1.0 cabal-install-v1.18.0.8 cabal-install-v1.18.0.7 cabal-install-v1.18.0.6 cabal-install-v1.18.0.6-rc cabal-install-v1.18.0.5 cabal-install-v1.18.0.4 cabal-install-v1.18.0.3 cabal-install-v1.18.0.2 cabal-install-v1.18.0.1 cabal-install-v1.18.0 cabal-install-v1.16.1.0 cabal-install-v1.16.0.2 cabal-install-v1.16.0.1 cabal-install-v.1.16.0 cabal-install-v1.16.0 cabal-install-v0.14.1 cabal-install-0.14.0 GHC_6_12_3_release GHC_6_12_2_release GHC_6_8_3_release Cabal_1_8_0_6_release Cabal_1_8_0_2_release Cabal-v2.0.0.2 Cabal-v2.0.0.1 Cabal-v2.0.0.0 Cabal-v1.24.2.0 Cabal-v1.24.1.0 Cabal-v1.24.0.0 Cabal-v1.22.8.0 Cabal-v1.22.7.0 Cabal-v1.22.6.0 Cabal-v1.22.5.0 Cabal-v1.22.4.0 Cabal-v1.22.3.0 Cabal-v1.22.2.0 Cabal-v1.22.1.1 Cabal-v1.22.1.0 Cabal-v1.22.0.0 Cabal-v1.22.0.0-rc Cabal-v1.20.0.4 Cabal-v1.20.0.3 Cabal-v1.20.0.3-rc Cabal-v1.20.0.2 Cabal-v1.20.0.1 Cabal-v1.20.0.0 Cabal-v1.20.0.0-rc Cabal-v1.20.0-rc Cabal-v1.18.1.6 Cabal-v1.18.1.5 Cabal-v1.18.1.5-rc Cabal-v1.18.1.4 Cabal-v1.18.1.3 Cabal-v1.18.1.2 Cabal-v1.18.1.1 Cabal-v1.18.1 Cabal-v1.18.0 Cabal-v1.16.0.3 Cabal-v1.16.0.2 Cabal-v1.16.0.1 Cabal-v1.16.0 Cabal-1.20.0.0-release Cabal-1.18.1.3-release Cabal-1.18.1.2-release Cabal-1.18.1.1-release Cabal-1.18.1-release Cabal-1.18.0-release 2008-06-06
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
IntegrationTests2
UnitTests
IntegrationTests2.hs
MemoryUsageTests.hs
README.md
SolverQuickCheck.hs
UnitTests.hs
test-cabal-install
test-cabal-install-user

README.md

Integration Tests

Each test is a shell script. Tests that share files (e.g., .cabal files) are grouped under a common sub-directory of IntegrationTests. The framework copies the whole group's directory before running each test, which allows tests to reuse files, yet run independently. A group's tests are further divided into should_run and should_fail directories, based on the expected exit status. For example, the test IntegrationTests/exec/should_fail/exit_with_failure_without_args.sh has access to all files under exec and is expected to fail.

Tests can specify their expected output. For a test named x.sh, x.out specifies stdout and x.err specifies stderr. Both files are optional. The framework expects an exact match between lines in the file and output, except for lines beginning with "RE:", which are interpreted as regular expressions.

IntegrationTests.hs defines several environment variables:

  • CABAL - The path to the executable being tested.
  • GHC_PKG - The path to ghc-pkg.
  • CABAL_ARGS - A common set of arguments for running cabal.
  • CABAL_ARGS_NO_CONFIG_FILE - CABAL_ARGS without --config-file.