diff --git a/cabal-testsuite/PackageTests/CustomTestCoverage/cabal.out b/cabal-testsuite/PackageTests/CustomTestCoverage/cabal.out index 3755a368fbd..8597dcc94df 100644 --- a/cabal-testsuite/PackageTests/CustomTestCoverage/cabal.out +++ b/cabal-testsuite/PackageTests/CustomTestCoverage/cabal.out @@ -4,14 +4,14 @@ Build profile: -w ghc- -O1 In order, the following will be built: - plain-0.1.0.0 *test (first run) Configuring plain-0.1.0.0... -Preprocessing library for plain-0.1.0.0.. -Building library for plain-0.1.0.0.. -Preprocessing test suite 'test' for plain-0.1.0.0.. -Building test suite 'test' for plain-0.1.0.0.. +Preprocessing library for plain-0.1.0.0... +Building library for plain-0.1.0.0... +Preprocessing test suite 'test' for plain-0.1.0.0... +Building test suite 'test' for plain-0.1.0.0... Running 1 test suites... Test suite test: RUNNING... Test suite test: PASS -Test suite logged to: cabal.dist/work/./dist/build//ghc-/plain-0.1.0.0/test/plain-0.1.0.0-test.log -Test coverage report written to cabal.dist/work/./dist/build//ghc-/plain-0.1.0.0/hpc/vanilla/html/test/hpc_index.html +Test suite logged to: /cabal.dist/work/./dist/build//ghc-/plain-0.1.0.0/test/plain-0.1.0.0-test.log +Package coverage report written to /cabal.dist/work/./dist/build//ghc-/plain-0.1.0.0/hpc/vanilla/html/hpc_index.html 1 of 1 test suites (1 of 1 test cases) passed. -Package coverage report written to cabal.dist/work/./dist/build//ghc-/plain-0.1.0.0/hpc/vanilla/html/plain-0.1.0.0/hpc_index.html +Package coverage report written to /cabal.dist/work/./dist/build//ghc-/plain-0.1.0.0/hpc/vanilla/html/hpc_index.html diff --git a/cabal-testsuite/PackageTests/Regression/T9640/cabal.out b/cabal-testsuite/PackageTests/Regression/T9640/cabal.out index 8ec3628aadb..4c0f119823f 100644 --- a/cabal-testsuite/PackageTests/Regression/T9640/cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T9640/cabal.out @@ -7,8 +7,8 @@ In order, the following will be built: - one-custom-0.1.0.0 (lib:one-custom) (requires build) - depend-on-custom-with-exe-0.1.0.0 (lib) (first run) Configuring one-custom-0.1.0.0... -Preprocessing library for one-custom-0.1.0.0.. -Building library for one-custom-0.1.0.0.. +Preprocessing library for one-custom-0.1.0.0... +Building library for one-custom-0.1.0.0... Installing library in Warning: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options" Configuring library for depend-on-custom-with-exe-0.1.0.0... diff --git a/cabal-testsuite/src/Test/Cabal/DecodeShowBuildInfo.hs b/cabal-testsuite/src/Test/Cabal/DecodeShowBuildInfo.hs index 02c1cb7e733..e335d6b93db 100644 --- a/cabal-testsuite/src/Test/Cabal/DecodeShowBuildInfo.hs +++ b/cabal-testsuite/src/Test/Cabal/DecodeShowBuildInfo.hs @@ -21,7 +21,7 @@ import System.Exit -- -- Results can be read via 'withPlan', 'buildInfoFile' and 'decodeBuildInfoFile'. runShowBuildInfo :: [String] -> TestM () -runShowBuildInfo args = cabal "build" ("--enable-build-info":args) +runShowBuildInfo args = noCabalPackageDb $ cabal "build" ("--enable-build-info":args) -- | Read 'build-info.json' for a given package and component -- from disk and record the content. Helpful for defining test-cases diff --git a/cabal-testsuite/src/Test/Cabal/Prelude.hs b/cabal-testsuite/src/Test/Cabal/Prelude.hs index 52430830014..8a0aaff928b 100644 --- a/cabal-testsuite/src/Test/Cabal/Prelude.hs +++ b/cabal-testsuite/src/Test/Cabal/Prelude.hs @@ -316,7 +316,7 @@ cabalGArgs global_args cmd args input = do | cmd `elem` ["v2-sdist", "path"] = [ "--project-file=" ++ fp | Just fp <- [testCabalProjectFile env] ] - | cmd == "v2-clean" + | cmd == "v2-clean" || cmd == "clean" = [ "--builddir", testDistDir env ] ++ [ "--project-file=" ++ fp | Just fp <- [testCabalProjectFile env] ] @@ -325,10 +325,14 @@ cabalGArgs global_args cmd args input = do , "-j1" ] ++ [ "--project-file=" ++ fp | Just fp <- [testCabalProjectFile env] ] ++ ["--package-db=" ++ db | Just db <- [testPackageDbPath env]] + | "v1-" `isPrefixOf` cmd + = [ "--builddir", testDistDir env ] + ++ install_args | otherwise - = [ "--builddir", testDistDir env ] ++ - install_args + = [ "--builddir", testDistDir env ] + ++ ["--package-db=" ++ db | Just db <- [testPackageDbPath env]] + ++ install_args install_args | cmd == "v1-install" || cmd == "v1-build" = [ "-j1" ]