From 7096300de79ea8b60c276ecf2b1501eabc249b4d Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Fri, 29 May 2015 22:34:17 -0400 Subject: [PATCH] Work around Travis failures on HEAD due to Cabal bug The previous failures were due to this bug: https://github.com/haskell/cabal/issues/1938 --- .travis.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 68756df4..58105c63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,18 @@ before_script: else streaming=streaming fi export streaming + - | # skip cabal test on HEAD due to this bug: + # https://github.com/haskell/cabal/issues/1938 + # this is fine as the test will be run during installation anyway + if [ "$CABALVER" = head ] + then def_cabal_test='cabal_test() { + echo "warning: cabal test skipped due to Cabal bug #1938" + }' + else def_cabal_test='cabal_test() { + cabal test "$@" + }' + fi + export def_cabal_test - | # check if '--run-tests' is supported (didn't exist until 1.20); # tests must be run prior to install as packages may be broken by install if cabal 2>&1 install --run-tests __dummy | @@ -63,6 +75,6 @@ script: - cabal build - cabal check - cabal sdist - - cabal test --show-details=$streaming + - eval "$def_cabal_test" && cabal_test --show-details=$streaming - eval "$def_cabal_install_run_tests" && cabal_install_run_tests --force-reinstalls dist/*-*.tar.gz