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
Haskell
Cabal
Commits
dd11cf2f
Commit
dd11cf2f
authored
5 years ago
by
Oleg Grenrus
Browse files
Options
Downloads
Patches
Plain Diff
Use runnerPackageDbStack if --with-ghc is the same as cabal-testsuite is compiled with
This makes e.g. LibV09 test work properly
parent
c65a379b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cabal-testsuite/Test/Cabal/Monad.hs
+12
-1
12 additions, 1 deletion
cabal-testsuite/Test/Cabal/Monad.hs
cabal-testsuite/Test/Cabal/Prelude.hs
+5
-0
5 additions, 0 deletions
cabal-testsuite/Test/Cabal/Prelude.hs
with
17 additions
and
1 deletion
cabal-testsuite/Test/Cabal/Monad.hs
+
12
−
1
View file @
dd11cf2f
...
...
@@ -285,13 +285,24 @@ runTestM mode m = withSystemTempDirectory "cabal-testsuite" $ \tmp_dir -> do
-- them up we must configure them
program_db
<-
configureAllKnownPrograms
verbosity
program_db3
let
ghcAndRunnedGhcAreTheSame
::
Bool
ghcAndRunnedGhcAreTheSame
=
fromMaybe
False
$
do
ghc_program
<-
lookupProgram
ghcProgram
program_db
runner_ghc_program
<-
lookupProgram
ghcProgram
(
runnerProgramDb
senv
)
return
$
programPath
ghc_program
==
programPath
runner_ghc_program
let
db_stack
=
case
argGhcPath
(
testCommonArgs
args
)
of
Nothing
->
runnerPackageDbStack
senv
-- NB: canonicalized
-- Can't use the build package db stack since they
-- are all for the wrong versions! TODO: Make
-- this configurable
Just
_
->
[
GlobalPackageDB
]
--
-- Oleg: if runner ghc and provided ghc are the same,
-- use runnerPackageDbStack. See 'hasCabalForGhc' check.
Just
_
|
ghcAndRunnedGhcAreTheSame
->
runnerPackageDbStack
senv
|
otherwise
->
[
GlobalPackageDB
]
env
=
TestEnv
{
testSourceDir
=
script_dir
,
testTmpDir
=
tmp_dir
,
...
...
This diff is collapsed.
Click to expand it.
cabal-testsuite/Test/Cabal/Prelude.hs
+
5
−
0
View file @
dd11cf2f
...
...
@@ -830,9 +830,14 @@ hasCabalForGhc = do
(
testVerbosity
env
)
ghcProgram
(
runnerProgramDb
(
testScriptEnv
env
))
-- TODO: I guess, to be more robust what we should check for
-- specifically is that the Cabal library we want to use
-- will be picked up by the package db stack of ghc-program
-- liftIO $ putStrLn $ "ghc_program: " ++ show ghc_program
-- liftIO $ putStrLn $ "runner_ghc_program: " ++ show runner_ghc_program
return
(
programPath
ghc_program
==
programPath
runner_ghc_program
)
-- | If you want to use a Custom setup with new-build, it needs to
...
...
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