Skip to content

Commit

Permalink
Formoulu
Browse files Browse the repository at this point in the history
  • Loading branch information
alt-romes committed Dec 5, 2023
1 parent c4f2f9a commit c327a18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Cabal/src/Distribution/Simple/Test/ExeV10.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runTest pkg_descr lbi clbi flags suite = do
dataDirPath = pwd </> PD.dataDir pkg_descr
tixFile = pwd </> tixFilePath distPref way (testName')
pkgPathEnv =
(pkgPathEnvVar pkg_descr "datadir", dataDirPath)
(pkgPathEnvVar pkg_descr "datadir", dataDirPath)
: existingEnv
shellEnv = [("HPCTIXFILE", tixFile) | isCoverageEnabled] ++ pkgPathEnv

Expand Down Expand Up @@ -170,7 +170,6 @@ runTest pkg_descr lbi clbi flags suite = do
notice verbosity $ summarizeSuiteFinish suiteLog

when isCoverageEnabled $ do

-- Until #9493 is fixed, we expect cabal-install to pass one dist dir per
-- library and there being at least one library in the package with the
-- testsuite. When it is fixed, we can remove this predicate and allow a
Expand Down
1 change: 0 additions & 1 deletion Cabal/src/Distribution/Simple/Test/LibV09.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ runTest pkg_descr lbi clbi flags suite = do
notice verbosity $ summarizeSuiteFinish suiteLog

when isCoverageEnabled $ do

-- Until #9493 is fixed, we expect cabal-install to pass one dist dir per
-- library and there being at least one library in the package with the
-- testsuite. When it is fixed, we can remove this predicate and allow a
Expand Down
12 changes: 6 additions & 6 deletions cabal-install/src/Distribution/Client/ProjectPlanning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4331,12 +4331,12 @@ setupHsTestFlags plan (ElaboratedConfiguredPackage{..}) sharedConfig verbosity d
$ Graph.toList
$ InstallPlan.toGraph plan

shouldCoverPkg ElaboratedConfiguredPackage{elabModuleShape = modShape, elabPkgSourceId = pkgId}
= elabLocalToProject
&& not (isIndefiniteOrInstantiation modShape)
-- TODO(#9493): We can only cover libraries in the same package
-- as the testsuite
&& pkgId == elabPkgSourceId
shouldCoverPkg ElaboratedConfiguredPackage{elabModuleShape = modShape, elabPkgSourceId = pkgId} =
elabLocalToProject
&& not (isIndefiniteOrInstantiation modShape)
-- TODO(#9493): We can only cover libraries in the same package
-- as the testsuite
&& pkgId == elabPkgSourceId

isIndefiniteOrInstantiation :: ModuleShape -> Bool
isIndefiniteOrInstantiation = not . Set.null . modShapeRequires
Expand Down

0 comments on commit c327a18

Please sign in to comment.