From c327a18c14f56479f63c69045e9236d9f7315d80 Mon Sep 17 00:00:00 2001 From: Rodrigo Mesquita Date: Tue, 5 Dec 2023 10:02:48 +0000 Subject: [PATCH] Formoulu --- Cabal/src/Distribution/Simple/Test/ExeV10.hs | 3 +-- Cabal/src/Distribution/Simple/Test/LibV09.hs | 1 - .../src/Distribution/Client/ProjectPlanning.hs | 12 ++++++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Cabal/src/Distribution/Simple/Test/ExeV10.hs b/Cabal/src/Distribution/Simple/Test/ExeV10.hs index 22e5b04ee09..af734c5123e 100644 --- a/Cabal/src/Distribution/Simple/Test/ExeV10.hs +++ b/Cabal/src/Distribution/Simple/Test/ExeV10.hs @@ -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 @@ -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 diff --git a/Cabal/src/Distribution/Simple/Test/LibV09.hs b/Cabal/src/Distribution/Simple/Test/LibV09.hs index 043e1aa418f..3204ce12227 100644 --- a/Cabal/src/Distribution/Simple/Test/LibV09.hs +++ b/Cabal/src/Distribution/Simple/Test/LibV09.hs @@ -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 diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs index ccb1e8f6340..4417b1eef24 100644 --- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs +++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs @@ -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