Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
6dfe46bb
Commit
6dfe46bb
authored
11 years ago
by
Mikhail Glushenkov
Browse files
Options
Downloads
Patches
Plain Diff
Enable TemplateHaskell/dynamic on Travis for all GHC versions.
parent
811a945e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.travis.yml
+1
-4
1 addition, 4 deletions
.travis.yml
Cabal/tests/PackageTests.hs
+4
-20
4 additions, 20 deletions
Cabal/tests/PackageTests.hs
with
5 additions
and
24 deletions
.travis.yml
+
1
−
4
View file @
6dfe46bb
...
@@ -12,11 +12,8 @@ env:
...
@@ -12,11 +12,8 @@ env:
before_install
:
before_install
:
-
sudo add-apt-repository -y ppa:hvr/ghc
-
sudo add-apt-repository -y ppa:hvr/ghc
-
sudo apt-get update
-
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
-
export PATH=/opt/ghc/$GHCVER/bin:$PATH
-
if [ $GHCVER != 7.8.1 ] && [ $GHCVER != head ]; then
export CABAL_TEST_NO_GHC_DYN=1;
fi
install
:
install
:
-
sudo /opt/ghc/$GHCVER/bin/ghc-pkg recache
-
sudo /opt/ghc/$GHCVER/bin/ghc-pkg recache
...
...
This diff is collapsed.
Click to expand it.
Cabal/tests/PackageTests.hs
+
4
−
20
View file @
6dfe46bb
...
@@ -58,7 +58,7 @@ hunit :: TestName -> HUnit.Test -> Test
...
@@ -58,7 +58,7 @@ hunit :: TestName -> HUnit.Test -> Test
hunit
name
test
=
testGroup
name
$
hUnitTestToTests
test
hunit
name
test
=
testGroup
name
$
hUnitTestToTests
test
tests
::
Version
->
PackageSpec
->
FilePath
->
FilePath
->
Bool
->
[
Test
]
tests
::
Version
->
PackageSpec
->
FilePath
->
FilePath
->
Bool
->
[
Test
]
tests
version
inplaceSpec
ghcPath
ghcPkgPath
noGHCDyn
=
tests
version
inplaceSpec
ghcPath
ghcPkgPath
=
[
hunit
"BuildDeps/SameDepsAllRound"
[
hunit
"BuildDeps/SameDepsAllRound"
(
PackageTests
.
BuildDeps
.
SameDepsAllRound
.
Check
.
suite
ghcPath
)
(
PackageTests
.
BuildDeps
.
SameDepsAllRound
.
Check
.
suite
ghcPath
)
-- The two following tests were disabled by Johan Tibell as
-- The two following tests were disabled by Johan Tibell as
...
@@ -98,14 +98,9 @@ tests version inplaceSpec ghcPath ghcPkgPath noGHCDyn =
...
@@ -98,14 +98,9 @@ tests version inplaceSpec ghcPath ghcPkgPath noGHCDyn =
(
PackageTests
.
BuildTestSuiteDetailedV09
.
Check
.
suite
inplaceSpec
ghcPath
)
(
PackageTests
.
BuildTestSuiteDetailedV09
.
Check
.
suite
inplaceSpec
ghcPath
)
,
hunit
"OrderFlags"
,
hunit
"OrderFlags"
(
PackageTests
.
OrderFlags
.
Check
.
suite
ghcPath
)
(
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
-- These tests are only required to pass on cabal version >= 1.7
(
if
version
>=
Version
[
1
,
7
]
[]
(
if
version
>=
Version
[
1
,
7
]
[]
then
[
hunit
"BuildDeps/TargetSpecificDeps1"
then
[
hunit
"BuildDeps/TargetSpecificDeps1"
...
@@ -147,20 +142,9 @@ main = do
...
@@ -147,20 +142,9 @@ main = do
putStrLn
$
"Using ghc: "
++
ghcPath
putStrLn
$
"Using ghc: "
++
ghcPath
putStrLn
$
"Using ghc-pkg: "
++
ghcPkgPath
putStrLn
$
"Using ghc-pkg: "
++
ghcPkgPath
setCurrentDirectory
"tests"
setCurrentDirectory
"tests"
-- Does this GHC have dynamic libs installed?
noGHCDyn
<-
checkNoGHCDyn
-- Create a shared Setup executable to speed up Simple tests
-- Create a shared Setup executable to speed up Simple tests
compileSetup
"."
ghcPath
compileSetup
"."
ghcPath
defaultMain
(
tests
cabalVersion
inplaceSpec
defaultMain
(
tests
cabalVersion
inplaceSpec
ghcPath
ghcPkgPath
)
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
)
-- Like Distribution.Simple.Configure.getPersistBuildConfig but
-- Like Distribution.Simple.Configure.getPersistBuildConfig but
-- doesn't check that the Cabal version matches, which it doesn't when
-- doesn't check that the Cabal version matches, which it doesn't when
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment