Skip to content

Commit d8c1017

Browse files
authored
Merge pull request #3989 from ezyang/pr/travis-with-ghc
Re-enable Travis testing other versions of GHC.
2 parents 458e2d7 + 5ab7191 commit d8c1017

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ matrix:
4040
- env: GHCVER=7.10.3 SCRIPT=script
4141
os: linux
4242
sudo: required
43-
- env: GHCVER=8.0.1 SCRIPT=script DEPLOY_DOCS=YES
43+
- env: GHCVER=8.0.1 SCRIPT=script DEPLOY_DOCS=YES TEST_OTHER_VERSIONS=YES
4444
sudo: required
4545
os: linux
4646
- env: GHCVER=8.0.1 SCRIPT=solver-debug-flags

Cabal/tests/PackageTests/Tests.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ tests config = do
4242
-- Test that Cabal parses 'test' sections correctly
4343
tc "TestStanza" PackageTests.TestStanza.Check.suite
4444

45-
-- Test that Cabal parses '^>=' operator correctly
46-
tc "CaretOperator" PackageTests.CaretOperator.Check.suite
45+
-- Test that Cabal parses '^>=' operator correctly.
46+
-- Don't run this for GHC 7.0/7.2, which doesn't have a recent
47+
-- enough version of pretty. (But this is pretty dumb.)
48+
tc "CaretOperator" . whenGhcVersion (>= mkVersion [7,3])$
49+
PackageTests.CaretOperator.Check.suite
4750

4851
-- Test that Cabal determinstically generates object archives
4952
tc "DeterministicAr" PackageTests.DeterministicAr.Check.suite

travis-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ -z ${STACKAGE_RESOLVER+x} ]; then
1616
travis_retry sudo add-apt-repository -y ppa:hvr/ghc
1717
travis_retry sudo apt-get update
1818
travis_retry sudo apt-get install --force-yes cabal-install-1.24 happy-1.19.5 ghc-$GHCVER-prof ghc-$GHCVER-dyn
19-
if [ "$TEST_OLDER" == "YES" ]; then travis_retry sudo apt-get install --force-yes ghc-7.0.4-prof ghc-7.0.4-dyn ghc-7.2.2-prof ghc-7.2.2-dyn; fi
19+
if [ "x$TEST_OTHER_VERSIONS" = "xYES" ]; then travis_retry sudo apt-get install --force-yes ghc-7.0.4-prof ghc-7.0.4-dyn ghc-7.2.2-prof ghc-7.2.2-dyn ghc-head-prof ghc-head-dyn; fi
2020

2121
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
2222

travis-script.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ timed cabal new-build Cabal Cabal:package-tests Cabal:unit-tests
6262
(cd Cabal && timed cabal act-as-setup --build-type=Simple -- haddock --builddir=${CABAL_BDIR}) || exit $?
6363

6464
# Redo the package tests with different versions of GHC
65-
# TODO: reenable me
66-
# if [ "x$TEST_OLDER" = "xYES" -a "x$TRAVIS_OS_NAME" = "xlinux" ]; then
67-
# CABAL_PACKAGETESTS_WITH_GHC=/opt/ghc/7.0.4/bin/ghc \
68-
# ./dist/setup/setup test package-tests --show-details=streaming
69-
# CABAL_PACKAGETESTS_WITH_GHC=/opt/ghc/7.2.2/bin/ghc \
70-
# ./dist/setup/setup test package-tests --show-details=streaming
71-
# fi
65+
if [ "x$TEST_OTHER_VERSIONS" = "xYES" ]; then
66+
(export CABAL_PACKAGETESTS_WITH_GHC="/opt/ghc/7.0.4/bin/ghc"; \
67+
cd Cabal && timed ${CABAL_BDIR}/build/package-tests/package-tests $TEST_OPTIONS)
68+
(export CABAL_PACKAGETESTS_WITH_GHC="/opt/ghc/7.2.2/bin/ghc"; \
69+
cd Cabal && timed ${CABAL_BDIR}/build/package-tests/package-tests $TEST_OPTIONS)
70+
(export CABAL_PACKAGETESTS_WITH_GHC="/opt/ghc/head/bin/ghc"; \
71+
cd Cabal && timed ${CABAL_BDIR}/build/package-tests/package-tests $TEST_OPTIONS)
72+
fi
7273

7374
# Check for package warnings
7475
(cd Cabal && timed cabal check) || exit $?

0 commit comments

Comments
 (0)