Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
6dfe46bb
Commit
6dfe46bb
authored
Feb 12, 2014
by
Mikhail Glushenkov
Browse files
Enable TemplateHaskell/dynamic on Travis for all GHC versions.
parent
811a945e
Changes
2
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
6dfe46bb
...
...
@@ -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
...
...
Cabal/tests/PackageTests.hs
View file @
6dfe46bb
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment