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
2fb0b8cf
Commit
2fb0b8cf
authored
10 years ago
by
ttuegel
Browse files
Options
Downloads
Plain Diff
Merge pull request #2471 from ttuegel/hpc-pkg-key
fix HPC tests with GHC 7.10
parents
25807bee
1bda4281
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/tests/PackageTests/TestSuiteExeV10/Check.hs
+16
-7
16 additions, 7 deletions
Cabal/tests/PackageTests/TestSuiteExeV10/Check.hs
with
16 additions
and
7 deletions
Cabal/tests/PackageTests/TestSuiteExeV10/Check.hs
+
16
−
7
View file @
2fb0b8cf
...
@@ -10,11 +10,16 @@ import Test.Framework (testGroup)
...
@@ -10,11 +10,16 @@ import Test.Framework (testGroup)
import
Test.Framework.Providers.HUnit
(
hUnitTestToTests
)
import
Test.Framework.Providers.HUnit
(
hUnitTestToTests
)
import
Test.HUnit
hiding
(
path
)
import
Test.HUnit
hiding
(
path
)
import
Distribution.Compiler
(
CompilerFlavor
(
..
),
CompilerId
(
..
))
import
Distribution.PackageDescription
(
package
)
import
Distribution.Simple.Compiler
(
compilerId
)
import
Distribution.Simple.Configure
(
getPersistBuildConfig
)
import
Distribution.Simple.Configure
(
getPersistBuildConfig
)
import
Distribution.Simple.LocalBuildInfo
(
compiler
,
localPkgDescr
,
pkgKey
)
import
Distribution.Simple.Hpc
import
Distribution.Simple.Hpc
import
Distribution.Simple.Program.Builtin
(
hpcProgram
)
import
Distribution.Simple.Program.Builtin
(
hpcProgram
)
import
Distribution.Simple.Program.Db
import
Distribution.Simple.Program.Db
(
emptyProgramDb
,
configureProgram
,
requireProgramVersion
)
(
emptyProgramDb
,
configureProgram
,
requireProgramVersion
)
import
Distribution.Text
(
display
)
import
qualified
Distribution.Verbosity
as
Verbosity
import
qualified
Distribution.Verbosity
as
Verbosity
import
Distribution.Version
(
Version
(
..
),
orLaterVersion
)
import
Distribution.Version
(
Version
(
..
),
orLaterVersion
)
...
@@ -70,16 +75,20 @@ checkTestWithHpc :: FilePath -> String -> [String] -> Test
...
@@ -70,16 +75,20 @@ checkTestWithHpc :: FilePath -> String -> [String] -> Test
checkTestWithHpc
ghcPath
name
extraOpts
=
TestCase
$
do
checkTestWithHpc
ghcPath
name
extraOpts
=
TestCase
$
do
isCorrectVersion
<-
correctHpcVersion
isCorrectVersion
<-
correctHpcVersion
when
isCorrectVersion
$
do
when
isCorrectVersion
$
do
let
distPref'
=
dir
</>
"dist-"
++
name
buildAndTest
ghcPath
name
[]
(
"--enable-coverage"
:
extraOpts
)
buildAndTest
ghcPath
name
[]
(
"--enable-coverage"
:
extraOpts
)
lbi
<-
getPersistBuildConfig
(
dir
</>
"dist-"
++
name
)
lbi
<-
getPersistBuildConfig
distPref'
let
way
=
guessWay
lbi
let
way
=
guessWay
lbi
CompilerId
comp
version
=
compilerId
(
compiler
lbi
)
subdir
|
comp
==
GHC
&&
version
>=
Version
[
7
,
10
]
[]
=
display
(
pkgKey
lbi
)
|
otherwise
=
display
(
package
$
localPkgDescr
lbi
)
mapM_
shouldExist
mapM_
shouldExist
[
mixDir
(
dir
</>
"dist-"
++
name
)
way
"my-0.1"
[
mixDir
distPref'
way
"my-0.1"
</>
subdir
</>
"Foo.mix"
</>
"my-0.1"
</>
"Foo.mix"
,
mixDir
distPref'
way
"test-Foo"
</>
"Main.mix"
,
mixDir
(
dir
</>
"dist-"
++
name
)
way
"test-Foo"
</>
"Main.mix"
,
tixFilePath
distPref'
way
"test-Foo"
,
tixFilePath
(
dir
</>
"dist-"
++
name
)
way
"test-Foo"
,
htmlDir
distPref'
way
"test-Foo"
</>
"hpc_index.html"
,
htmlDir
(
dir
</>
"dist-"
++
name
)
way
"test-Foo"
</>
"hpc_index.html"
]
]
-- | Ensures that even if -fhpc is manually provided no .tix file is output.
-- | Ensures that even if -fhpc is manually provided no .tix file is output.
...
...
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