Permalink
Browse files

Enable TemplateHaskell/dynamic on Travis for all GHC versions.

  • Loading branch information...
1 parent 811a945 commit 6dfe46bb9d0980fb5262788d36ce28b65feeb50c @23Skidoo 23Skidoo committed Feb 12, 2014
Showing with 5 additions and 24 deletions.
  1. +1 −4 .travis.yml
  2. +4 −20 Cabal/tests/PackageTests.hs
View
@@ -12,11 +12,8 @@ env:
before_install:
- sudo add-apt-repository -y ppa:hvr/ghc
- sudo apt-get update
- - sudo apt-get install cabal-install-1.18 ghc-$GHCVER-prof happy
+ - sudo apt-get install cabal-install-1.18 ghc-$GHCVER-prof ghc-$GHCVER-dyn happy
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
- - if [ $GHCVER != 7.8.1 ] && [ $GHCVER != head ]; then
- export CABAL_TEST_NO_GHC_DYN=1;
- fi
install:
- sudo /opt/ghc/$GHCVER/bin/ghc-pkg recache
@@ -58,7 +58,7 @@ hunit :: TestName -> HUnit.Test -> Test
hunit name test = testGroup name $ hUnitTestToTests test
tests :: Version -> PackageSpec -> FilePath -> FilePath -> Bool -> [Test]
-tests version inplaceSpec ghcPath ghcPkgPath noGHCDyn =
+tests version inplaceSpec ghcPath ghcPkgPath =
[ hunit "BuildDeps/SameDepsAllRound"
(PackageTests.BuildDeps.SameDepsAllRound.Check.suite ghcPath)
-- The two following tests were disabled by Johan Tibell as
@@ -98,14 +98,9 @@ tests version inplaceSpec ghcPath ghcPkgPath noGHCDyn =
(PackageTests.BuildTestSuiteDetailedV09.Check.suite inplaceSpec ghcPath)
, hunit "OrderFlags"
(PackageTests.OrderFlags.Check.suite ghcPath)
+ , hunit "TemplateHaskell/dynamic"
+ (PackageTests.TemplateHaskell.Check.dynamic ghcPath)
] ++
- -- These tests are expected to fail on some Travis configurations because
- -- hvr's pre-7.8 PPA GHCs don't include dynamic libs.
- (if not noGHCDyn
- then [ hunit "TemplateHaskell/dynamic"
- (PackageTests.TemplateHaskell.Check.dynamic ghcPath)
- ]
- else []) ++
-- These tests are only required to pass on cabal version >= 1.7
(if version >= Version [1, 7] []
then [ hunit "BuildDeps/TargetSpecificDeps1"
@@ -147,20 +142,9 @@ main = do
putStrLn $ "Using ghc: " ++ ghcPath
putStrLn $ "Using ghc-pkg: " ++ ghcPkgPath
setCurrentDirectory "tests"
- -- Does this GHC have dynamic libs installed?
- noGHCDyn <- checkNoGHCDyn
-- Create a shared Setup executable to speed up Simple tests
compileSetup "." ghcPath
- defaultMain (tests cabalVersion inplaceSpec
- ghcPath ghcPkgPath noGHCDyn)
-
--- | Are dynamic libraries installed? Travis build bot doesn't have dynamic libs
--- for all configurations.
-checkNoGHCDyn :: IO Bool
-checkNoGHCDyn = fmap isJust (lookupEnv "CABAL_TEST_NO_GHC_DYN")
- where
- lookupEnv :: String -> IO (Maybe String)
- lookupEnv name = (Just `fmap` getEnv name) `catchIO` const (return Nothing)
+ defaultMain (tests cabalVersion inplaceSpec ghcPath ghcPkgPath)
-- Like Distribution.Simple.Configure.getPersistBuildConfig but
-- doesn't check that the Cabal version matches, which it doesn't when

0 comments on commit 6dfe46b

Please sign in to comment.