From ab355361526d57da54571089bd2bdd21f2683bd8 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 2 Apr 2020 23:17:17 +0300 Subject: [PATCH] setupAndCabalTest uses cabal act-as-setup for cabal part The cabal command interface will drift more and more from ./Setup interface. This is first step: don't assume they are the same. This removes need to "patch" setup commands to work with cabal: the `act-as-setup` SHOULD behave as (simple) ./Setup There were few setupAndCabalTests which weren't `build-type: Simple`. For those I made a separate `cabal.test.hs`. Also added a OutputNormalizer for global tmp directory. `v2-build` sdists `build-type: Custom` packages to get the list of files to watch. I guess it's ok to have that functionality, yet it could be eventually removed, as `v2-sdist` does not invoke `./Setup.hs` script. --- .../Ambiguity/setup-package-import.cabal.out | 3 - .../Ambiguity/setup-reexport.cabal.out | 4 -- .../AutogenModules/Package/setup.cabal.out | 1 - .../AutogenModules/SrcDist/setup.cabal.out | 2 - .../Backpack/Fail1/setup.cabal.out | 1 - .../Backpack/Fail2/setup.cabal.out | 1 - .../Backpack/Fail3/setup.cabal.out | 1 - .../Backpack/Includes1/setup.cabal.out | 1 - .../Includes2/setup-external.cabal.out | 15 ----- .../Includes2/setup-internal-fail.cabal.out | 1 - .../Includes2/setup-internal.cabal.out | 1 - .../Includes3/setup-external-fail.cabal.out | 2 - .../Includes3/setup-external-ok.cabal.out | 5 -- .../Includes3/setup-internal.cabal.out | 1 - .../Backpack/Includes4/setup.cabal.out | 1 - .../Backpack/Includes5/setup.cabal.out | 1 - .../Backpack/Indef2/setup.cabal.out | 1 - .../Backpack/Reexport1/setup.cabal.out | 2 - .../Backpack/Reexport2/setup.cabal.out | 1 - .../Backpack/T4447/setup.cabal.out | 1 - .../Backpack/T4754/setup.cabal.out | 1 - .../Backpack/T5634/setup.cabal.out | 1 - .../Backpack/TemplateHaskell/setup.cabal.out | 1 - .../BenchmarkExeV10/setup.cabal.out | 1 - .../BenchmarkOptions/setup.cabal.out | 5 -- .../BenchmarkStanza/setup.cabal.out | 1 - .../BuildDeps/DepCycle/setup.cabal.out | 1 - .../InternalLibrary0/setup.cabal.out | 1 - .../InternalLibrary1/setup.cabal.out | 1 - .../InternalLibrary2/setup.cabal.out | 2 - .../InternalLibrary3/setup.cabal.out | 2 - .../SameDepsAllRound/setup.cabal.out | 1 - .../TargetSpecificDeps1/setup.cabal.out | 1 - .../TargetSpecificDeps2/setup.cabal.out | 1 - .../TargetSpecificDeps3/setup.cabal.out | 1 - .../setup.cabal.out | 1 - .../BuildTools/Foreign/setup.cabal.out | 1 - .../BuildTools/Internal/setup.cabal.out | 1 - .../PackageTests/CMain/setup.cabal.out | 1 - .../PackageTests/COnlyMain/setup.cabal.out | 1 - .../PackageTests/CabalMacros/setup.cabal.out | 1 - .../PackageTests/Configure/cabal.out | 9 +++ .../PackageTests/Configure/cabal.project | 2 + .../PackageTests/Configure/cabal.test.hs | 10 +++ .../PackageTests/Configure/setup.test.hs | 2 +- .../ConfigureComponent/Exe/setup.cabal.out | 8 --- .../CopyComponent/Exe/setup.cabal.out | 1 - .../CopyComponent/Lib/setup.cabal.out | 1 - .../PackageTests/CustomPlain/setup.test.hs | 2 +- .../PackageTests/CustomPreProcess/Setup.hs | 14 ++++ .../PackageTests/CustomPreProcess/cabal.out | 2 + .../CustomPreProcess/cabal.project | 2 + .../CustomPreProcess/cabal.test.hs | 13 ++++ .../internal-preprocessor-test.cabal | 3 + .../CustomPreProcess/setup.test.hs | 2 +- .../setup-default-ar.cabal.out | 1 - .../setup-old-ar-without-at-args.cabal.out | 1 - .../DuplicateModuleName/setup.cabal.out | 9 --- .../PackageTests/EmptyLib/setup.cabal.out | 1 - .../GhcPkgGuess/SameDirectory/setup.cabal.out | 1 + .../SameDirectoryGhcVersion/setup.cabal.out | 1 + .../SameDirectoryVersion/setup.cabal.out | 1 + .../GhcPkgGuess/Symlink/setup.cabal.out | 1 + .../SymlinkGhcVersion/setup.cabal.out | 1 + .../SymlinkVersion/setup.cabal.out | 1 + .../PackageTests/Haddock/setup.cabal.out | 1 - .../HaddockNewline/setup.cabal.out | 1 - .../Executable/setup-static.cabal.out | 2 - .../InternalLibraries/Library/setup.cabal.out | 2 - .../setup-gen-pkg-config.cabal.out | 2 - .../setup-gen-script.cabal.out | 2 - .../InternalLibraries/setup.cabal.out | 2 - .../BuildDependsBad/setup.cabal.out | 8 --- .../BuildDependsExtra/setup.cabal.out | 1 - .../BuildToolDependsBad/setup.cabal.out | 1 - .../BuildToolDependsExtra/setup.cabal.out | 1 - .../BuildToolsBad/setup.cabal.out | 1 - .../BuildToolsExtra/setup.cabal.out | 1 - .../PackageTests/Macros/setup.cabal.out | 1 - .../PackageTests/OrderFlags/setup.cabal.out | 1 - .../PathsModule/Executable/setup.cabal.out | 1 - .../PathsModule/Library/setup.cabal.out | 1 - .../PackageTests/PreProcess/setup.cabal.out | 1 - .../PreProcessExtraSources/setup.cabal.out | 1 - .../QuasiQuotes/dynamic/setup.cabal.out | 1 - .../QuasiQuotes/profiling/setup.cabal.out | 1 - .../QuasiQuotes/vanilla/setup.cabal.out | 1 - .../setup-fail-ambiguous.cabal.out | 2 - .../setup-fail-missing.cabal.out | 1 - .../setup-fail-other.cabal.out | 1 - .../ReexportedModules/setup.cabal.out | 2 - .../Regression/T2755/setup.cabal.out | 3 +- .../Regression/T2971/setup.cabal.out | 2 - .../Regression/T2971a/setup.cabal.out | 1 - .../Regression/T3294/setup.cabal.out | 1 - .../Regression/T3847/setup.cabal.out | 1 - .../Regression/T4025/setup.cabal.out | 1 - .../Regression/T4270/setup.cabal.out | 5 -- .../Regression/T4291/setup.cabal.out | 2 - .../PackageTests/Regression/T4449/setup.out | 1 - .../Regression/T6125/setup.cabal.out | 1 - .../SPDX/cabal-old-build.cabal.out | 1 - .../PackageTests/SPDX/cabal-old-build.test.hs | 3 - .../TemplateHaskell/dynamic/setup.cabal.out | 1 - .../TemplateHaskell/profiling/setup.cabal.out | 1 - .../TemplateHaskell/vanilla/setup.cabal.out | 1 - .../TestNameCollision/setup.cabal.out | 6 -- .../PackageTests/TestOptions/setup.cabal.out | 5 -- .../PackageTests/TestStanza/setup.cabal.out | 1 - .../ExeV10/setup-no-markup.cabal.out | 5 -- .../ExeV10/setup-no-tix.cabal.out | 5 -- .../LibV09/setup-deadlock.cabal.out | 5 -- .../TestSuiteTests/LibV09/setup.cabal.out | 1 - .../PackageTests/UniqueIPID/setup.cabal.out | 2 - cabal-testsuite/src/Test/Cabal/Monad.hs | 3 + .../src/Test/Cabal/OutputNormalizer.hs | 2 + cabal-testsuite/src/Test/Cabal/Prelude.hs | 65 +++++++------------ 117 files changed, 94 insertions(+), 233 deletions(-) create mode 100644 cabal-testsuite/PackageTests/Configure/cabal.out create mode 100644 cabal-testsuite/PackageTests/Configure/cabal.project create mode 100644 cabal-testsuite/PackageTests/Configure/cabal.test.hs create mode 100644 cabal-testsuite/PackageTests/CustomPreProcess/cabal.out create mode 100644 cabal-testsuite/PackageTests/CustomPreProcess/cabal.project create mode 100644 cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs diff --git a/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.cabal.out b/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.cabal.out index a8eff94c6cd..159a4604ada 100644 --- a/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.cabal.out +++ b/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library for p-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for p-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring q-0.1.0.0... # Setup build Preprocessing library for q-0.1.0.0.. @@ -19,7 +17,6 @@ Installing library in # Setup register Registering library for q-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring package-import-0.1.0.0... # Setup build Preprocessing executable 'package-import' for package-import-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.cabal.out b/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.cabal.out index 92ae3aa30bb..945c350bf66 100644 --- a/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.cabal.out +++ b/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library for p-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for p-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring q-0.1.0.0... # Setup build Preprocessing library for q-0.1.0.0.. @@ -19,7 +17,6 @@ Installing library in # Setup register Registering library for q-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring reexport-0.1.0.0... # Setup build Preprocessing library for reexport-0.1.0.0.. @@ -29,7 +26,6 @@ Installing library in # Setup register Registering library for reexport-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring reexport-test-0.1.0.0... # Setup build Preprocessing executable 'reexport-test' for reexport-test-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out index 969342196a3..9036e43d365 100644 --- a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out +++ b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring AutogenModules-0.1... cabal: An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'. diff --git a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out index fe0ec9526f1..ab3184737ca 100644 --- a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out +++ b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring AutogenModules-0.1... # Setup sdist Building source dist for AutogenModules-0.1... @@ -8,4 +7,3 @@ Preprocessing library for AutogenModules-0.1.. Source tarball created: setup.cabal.dist/work/dist/AutogenModules-0.1.tar.gz # Setup sdist List of package sources written to file '/setup.cabal.dist/work/./dist/list-sources.txt' -List of package sources written to file '/setup.cabal.dist/work/./dist/list-sources.txt' diff --git a/cabal-testsuite/PackageTests/Backpack/Fail1/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Fail1/setup.cabal.out index 81ae0085f18..7c4901d3bea 100644 --- a/cabal-testsuite/PackageTests/Backpack/Fail1/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Fail1/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Fail1-0.1.0.0... Error: The library 'sig' from package 'Fail1-0.1.0.0' does not require: diff --git a/cabal-testsuite/PackageTests/Backpack/Fail2/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Fail2/setup.cabal.out index 0377b5a6e3a..b816c794a80 100644 --- a/cabal-testsuite/PackageTests/Backpack/Fail2/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Fail2/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Fail2-0.1.0.0... Error: Mix-in refers to non-existent package 'non-existent' diff --git a/cabal-testsuite/PackageTests/Backpack/Fail3/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Fail3/setup.cabal.out index 8be2b665da3..d1e33f130cf 100644 --- a/cabal-testsuite/PackageTests/Backpack/Fail3/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Fail3/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Fail1-0.1.0.0... Error: Non-library component has unfilled requirements: UnfilledSig diff --git a/cabal-testsuite/PackageTests/Backpack/Includes1/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes1/setup.cabal.out index bc7cfe1d9fc..ae955643a2b 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes1/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes1/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Includes1-0.1.0.0... # Setup build Preprocessing library for Includes1-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out index 74ede341052..28d34c68971 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring mylib-0.1.0.0... # Setup build Preprocessing library for mylib-0.1.0.0.. @@ -16,7 +15,6 @@ Installing library in Registering library instantiated with Database = for mylib-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring mysql-0.1.0.0... # Setup build Preprocessing library for mysql-0.1.0.0.. @@ -30,7 +28,6 @@ Installing library in # Setup register Registering library for mysql-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring postgresql-0.1.0.0... # Setup build Preprocessing library for postgresql-0.1.0.0.. @@ -44,7 +41,6 @@ Installing library in # Setup register Registering library for postgresql-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring mylib-0.1.0.0... # Setup build Preprocessing library for mylib-0.1.0.0.. @@ -62,7 +58,6 @@ Installing library in Registering library instantiated with Database = mysql-0.1.0.0:Database.MySQL for mylib-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring mylib-0.1.0.0... # Setup build Preprocessing library for mylib-0.1.0.0.. @@ -82,7 +77,6 @@ Registering library instantiated with Database = postgresql-0.1.0.0:Database.PostgreSQL for mylib-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring src-0.1.0.0... # Setup build Preprocessing library for src-0.1.0.0.. @@ -96,15 +90,6 @@ Installing library in # Setup register Registering library for src-0.1.0.0.. # Setup configure -Resolving dependencies... -Warning: solver failed to find a solution: -Could not resolve dependencies: -[__0] trying: exe-0.1.0.0 (user goal) -[__1] next goal: src (dependency of exe) -[__1] rejecting: src-/installed- (conflict: src => mylib==/installed-, src => mylib==/installed-) -[__1] fail (backjumping, conflict set: exe, src) -After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: exe (2), src (2) -Trying configure anyway. Configuring exe-0.1.0.0... # Setup build Preprocessing executable 'exe' for exe-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal-fail.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal-fail.cabal.out index 8f98b33e7da..e16f8623d52 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal-fail.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal-fail.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring fail-0.1.0.0... Error: - Cannot match module names diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.cabal.out index e11dc504091..c6c0d1df9f6 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Includes2-0.1.0.0... # Setup build Preprocessing library 'postgresql' for Includes2-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-fail.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-fail.cabal.out index c657bb0d5d4..0b5b86e58fe 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-fail.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-fail.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring sigs-0.1.0.0... # Setup build Preprocessing library for sigs-0.1.0.0.. @@ -11,7 +10,6 @@ Installing library in Registering library instantiated with Data.Map = for sigs-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring indef-0.1.0.0... # Setup build Preprocessing library for indef-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out index 3df24d73430..c661e2a14ed 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring sigs-0.1.0.0... # Setup build Preprocessing library for sigs-0.1.0.0.. @@ -16,7 +15,6 @@ Installing library in Registering library instantiated with Data.Map = for sigs-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring indef-0.1.0.0... # Setup build Preprocessing library for indef-0.1.0.0.. @@ -33,7 +31,6 @@ Installing library in Registering library instantiated with Data.Map = for indef-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring sigs-0.1.0.0... # Setup build Preprocessing library for sigs-0.1.0.0.. @@ -51,7 +48,6 @@ Installing library in Registering library instantiated with Data.Map = containers-:Data.Map for sigs-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring indef-0.1.0.0... # Setup build Preprocessing library for indef-0.1.0.0.. @@ -69,7 +65,6 @@ Installing library in Registering library instantiated with Data.Map = containers-:Data.Map for indef-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring exe-0.1.0.0... # Setup build Preprocessing executable 'exe' for exe-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.cabal.out index a22710f4f17..b3708f389b9 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Includes3-0.1.0.0... # Setup build Preprocessing library 'sigs' for Includes3-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes4/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes4/setup.cabal.out index 1995b37283f..56b60144bc4 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes4/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes4/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Includes4-0.1.0.0... # Setup build Preprocessing library 'indef' for Includes4-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Includes5/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes5/setup.cabal.out index 215f15294d1..e8592c4cb21 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes5/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Includes5/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Includes5-0.1.0.0... # Setup build Preprocessing library 'impl' for Includes5-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Indef2/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Indef2/setup.cabal.out index 35064eb3c67..da9ed8cb6e5 100644 --- a/cabal-testsuite/PackageTests/Backpack/Indef2/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Indef2/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Indef2-0.1.0.0... # Setup build Preprocessing library 'asig1' for Indef2-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out index dfa26222c9d..925eb46040b 100644 --- a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library for p-0.1.0.0.. @@ -13,7 +12,6 @@ Installing library in # Setup register Registering library for p-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring q-0.1.0.0... # Setup build Preprocessing library for q-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Backpack/Reexport2/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Reexport2/setup.cabal.out index 07462c02397..be0cbc1d0cb 100644 --- a/cabal-testsuite/PackageTests/Backpack/Reexport2/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/Reexport2/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring Reexport2-1.0... cabal: Duplicate modules in library: Asdf diff --git a/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out index 6166a270945..ff9ad4456e6 100644 --- a/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring T4447-1.0... Error: Cannot instantiate requirement 'A' brought into scope by build-depends: T4447:foo-indef diff --git a/cabal-testsuite/PackageTests/Backpack/T4754/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/T4754/setup.cabal.out index 8f4a37ed6e3..344cfd9c3ba 100644 --- a/cabal-testsuite/PackageTests/Backpack/T4754/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/T4754/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1... Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. # Setup build diff --git a/cabal-testsuite/PackageTests/Backpack/T5634/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/T5634/setup.cabal.out index 2a89ca0d845..b7d7eb0e23f 100644 --- a/cabal-testsuite/PackageTests/Backpack/T5634/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/T5634/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring th-backpack-failure-1.0... Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. # Setup build diff --git a/cabal-testsuite/PackageTests/Backpack/TemplateHaskell/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/TemplateHaskell/setup.cabal.out index f1275306386..ead7b76377f 100644 --- a/cabal-testsuite/PackageTests/Backpack/TemplateHaskell/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Backpack/TemplateHaskell/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring bkpth-1.0... # Setup build Preprocessing library 'helper' for bkpth-1.0.. diff --git a/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.cabal.out b/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.cabal.out index 99a427b1be3..cf9619b62e5 100644 --- a/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring my-0.1... # Setup build Preprocessing library for my-0.1.. diff --git a/cabal-testsuite/PackageTests/BenchmarkOptions/setup.cabal.out b/cabal-testsuite/PackageTests/BenchmarkOptions/setup.cabal.out index 11f87aab303..0541f7c60e1 100644 --- a/cabal-testsuite/PackageTests/BenchmarkOptions/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BenchmarkOptions/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring BenchmarkOptions-0.1... # Setup build Preprocessing benchmark 'test-BenchmarkOptions' for BenchmarkOptions-0.1.. @@ -7,14 +6,10 @@ Building benchmark 'test-BenchmarkOptions' for BenchmarkOptions-0.1.. Preprocessing executable 'dummy' for BenchmarkOptions-0.1.. Building executable 'dummy' for BenchmarkOptions-0.1.. # Setup bench -Preprocessing benchmark 'test-BenchmarkOptions' for BenchmarkOptions-0.1.. -Building benchmark 'test-BenchmarkOptions' for BenchmarkOptions-0.1.. Running 1 benchmarks... Benchmark test-BenchmarkOptions: RUNNING... Benchmark test-BenchmarkOptions: FINISH # Setup bench -Preprocessing benchmark 'test-BenchmarkOptions' for BenchmarkOptions-0.1.. -Building benchmark 'test-BenchmarkOptions' for BenchmarkOptions-0.1.. Running 1 benchmarks... Benchmark test-BenchmarkOptions: RUNNING... Benchmark test-BenchmarkOptions: FINISH diff --git a/cabal-testsuite/PackageTests/BenchmarkStanza/setup.cabal.out b/cabal-testsuite/PackageTests/BenchmarkStanza/setup.cabal.out index 237666bb57c..6557de9cc28 100644 --- a/cabal-testsuite/PackageTests/BenchmarkStanza/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BenchmarkStanza/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring BenchmarkStanza-0.1... Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. diff --git a/cabal-testsuite/PackageTests/BuildDeps/DepCycle/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/DepCycle/setup.cabal.out index fd6dedad0e2..2097c26f9c4 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/DepCycle/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/DepCycle/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring DepCycle-1.0... Error: Components in the package depend on each other in a cyclic way: diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary0/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary0/setup.cabal.out index 28e5610ef52..80c67b632cf 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary0/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary0/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring InternalLibrary0-0.1... cabal: The field 'build-depends: InternalLibrary0' refers to a library which is defined within the same package. To use this feature the package must specify at least 'cabal-version: >= 1.8'. diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.cabal.out index 8cac6352744..5b6256e9095 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring InternalLibrary1-0.1... # Setup build Preprocessing library for InternalLibrary1-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.cabal.out index 427f35b191e..7a0284e4b0c 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring InternalLibrary2-0.1... # Setup build Preprocessing library for InternalLibrary2-0.1.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for InternalLibrary2-0.1.. # Setup configure -Resolving dependencies... Configuring InternalLibrary2-0.1... # Setup build Preprocessing library for InternalLibrary2-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.cabal.out index 0600e5c1846..0e80915a70d 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring InternalLibrary3-0.2... # Setup build Preprocessing library for InternalLibrary3-0.2.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for InternalLibrary3-0.2.. # Setup configure -Resolving dependencies... Configuring InternalLibrary3-0.1... # Setup build Preprocessing library for InternalLibrary3-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.cabal.out index 5a6abfd8836..5eb00ee13ff 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring SameDepsAllRound-0.1... # Setup build Preprocessing executable 'pineapple' for SameDepsAllRound-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.cabal.out index ca931e014f3..a6eb27f8653 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps1/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring TargetSpecificDeps1-0.1... # Setup build Preprocessing executable 'lemon' for TargetSpecificDeps1-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.cabal.out index ca931e014f3..a6eb27f8653 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring TargetSpecificDeps1-0.1... # Setup build Preprocessing executable 'lemon' for TargetSpecificDeps1-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.cabal.out b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.cabal.out index d78ff3f2b26..550bb67a2b9 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps3/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring test-0.1... # Setup build Preprocessing executable 'lemon' for test-0.1.. diff --git a/cabal-testsuite/PackageTests/BuildToolDependsInternalMissing/setup.cabal.out b/cabal-testsuite/PackageTests/BuildToolDependsInternalMissing/setup.cabal.out index e111590d1d2..27d8261c224 100644 --- a/cabal-testsuite/PackageTests/BuildToolDependsInternalMissing/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildToolDependsInternalMissing/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring build-tool-depends-missing-0.1.0.0... cabal: The package depends on a missing internal executable: diff --git a/cabal-testsuite/PackageTests/BuildTools/Foreign/setup.cabal.out b/cabal-testsuite/PackageTests/BuildTools/Foreign/setup.cabal.out index bcfe278b975..b31251b2ac1 100644 --- a/cabal-testsuite/PackageTests/BuildTools/Foreign/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildTools/Foreign/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring build-tools-path-foreign-0.1.0.0... # Setup build Preprocessing library for build-tools-path-foreign-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/BuildTools/Internal/setup.cabal.out b/cabal-testsuite/PackageTests/BuildTools/Internal/setup.cabal.out index 3ad4284bad3..1809ec348ad 100644 --- a/cabal-testsuite/PackageTests/BuildTools/Internal/setup.cabal.out +++ b/cabal-testsuite/PackageTests/BuildTools/Internal/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring foo-0.1.0.0... # Setup build Preprocessing executable 'my-cpp' for foo-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/CMain/setup.cabal.out b/cabal-testsuite/PackageTests/CMain/setup.cabal.out index 0e444367380..d3dabcf6cd7 100644 --- a/cabal-testsuite/PackageTests/CMain/setup.cabal.out +++ b/cabal-testsuite/PackageTests/CMain/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring my-0.1... # Setup build Preprocessing executable 'foo' for my-0.1.. diff --git a/cabal-testsuite/PackageTests/COnlyMain/setup.cabal.out b/cabal-testsuite/PackageTests/COnlyMain/setup.cabal.out index 0e444367380..d3dabcf6cd7 100644 --- a/cabal-testsuite/PackageTests/COnlyMain/setup.cabal.out +++ b/cabal-testsuite/PackageTests/COnlyMain/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring my-0.1... # Setup build Preprocessing executable 'foo' for my-0.1.. diff --git a/cabal-testsuite/PackageTests/CabalMacros/setup.cabal.out b/cabal-testsuite/PackageTests/CabalMacros/setup.cabal.out index 964a3422101..dbfc1043f1a 100644 --- a/cabal-testsuite/PackageTests/CabalMacros/setup.cabal.out +++ b/cabal-testsuite/PackageTests/CabalMacros/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring CabalMacros-0.1... # Setup build Preprocessing library for CabalMacros-0.1.. diff --git a/cabal-testsuite/PackageTests/Configure/cabal.out b/cabal-testsuite/PackageTests/Configure/cabal.out new file mode 100644 index 00000000000..8c495b9bd37 --- /dev/null +++ b/cabal-testsuite/PackageTests/Configure/cabal.out @@ -0,0 +1,9 @@ +# cabal v2-build +Resolving dependencies... +Build profile: -w ghc- -O1 +In order, the following will be built: + - zlib-1.1 (lib:zlib) (first run) +Configuring zlib-1.1... +Preprocessing library for zlib-1.1.. +Building library for zlib-1.1.. +List of package sources written to file '/cabal-sdist-list-sources' diff --git a/cabal-testsuite/PackageTests/Configure/cabal.project b/cabal-testsuite/PackageTests/Configure/cabal.project new file mode 100644 index 00000000000..c314e91f2af --- /dev/null +++ b/cabal-testsuite/PackageTests/Configure/cabal.project @@ -0,0 +1,2 @@ +-- remove me when `v2-build -z` is implemented +packages: . diff --git a/cabal-testsuite/PackageTests/Configure/cabal.test.hs b/cabal-testsuite/PackageTests/Configure/cabal.test.hs new file mode 100644 index 00000000000..55c31aba0b7 --- /dev/null +++ b/cabal-testsuite/PackageTests/Configure/cabal.test.hs @@ -0,0 +1,10 @@ +import Test.Cabal.Prelude +import Control.Monad.IO.Class +import Data.Maybe +import System.Directory +-- Test for 'build-type: Configure' example from the setup manual. +main = cabalTest $ do + hasAutoreconf <- liftIO $ fmap isJust $ findExecutable "autoreconf" + skipUnless hasAutoreconf + _ <- shell "autoreconf" ["-i"] + cabal "v2-build" [] diff --git a/cabal-testsuite/PackageTests/Configure/setup.test.hs b/cabal-testsuite/PackageTests/Configure/setup.test.hs index 1c334a6e085..f646bc9622b 100644 --- a/cabal-testsuite/PackageTests/Configure/setup.test.hs +++ b/cabal-testsuite/PackageTests/Configure/setup.test.hs @@ -3,7 +3,7 @@ import Control.Monad.IO.Class import Data.Maybe import System.Directory -- Test for 'build-type: Configure' example from the setup manual. -main = setupAndCabalTest $ do +main = setupTest $ do hasAutoreconf <- liftIO $ fmap isJust $ findExecutable "autoreconf" skipUnless hasAutoreconf _ <- shell "autoreconf" ["-i"] diff --git a/cabal-testsuite/PackageTests/ConfigureComponent/Exe/setup.cabal.out b/cabal-testsuite/PackageTests/ConfigureComponent/Exe/setup.cabal.out index 90439a1fdc6..dc084f1636b 100644 --- a/cabal-testsuite/PackageTests/ConfigureComponent/Exe/setup.cabal.out +++ b/cabal-testsuite/PackageTests/ConfigureComponent/Exe/setup.cabal.out @@ -1,12 +1,4 @@ # Setup configure -Resolving dependencies... -Warning: solver failed to find a solution: -Could not resolve dependencies: -[__0] trying: Exe-0.1.0.0 (user goal) -[__1] unknown package: totally-impossible-dependency-to-fill (dependency of Exe) -[__1] fail (backjumping, conflict set: Exe, totally-impossible-dependency-to-fill) -After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: Exe (2), totally-impossible-dependency-to-fill (1) -Trying configure anyway. Configuring executable 'goodexe' for Exe-0.1.0.0.. # Setup build Preprocessing executable 'goodexe' for Exe-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/CopyComponent/Exe/setup.cabal.out b/cabal-testsuite/PackageTests/CopyComponent/Exe/setup.cabal.out index 5fb74e5c3ce..1d25dc60bc7 100644 --- a/cabal-testsuite/PackageTests/CopyComponent/Exe/setup.cabal.out +++ b/cabal-testsuite/PackageTests/CopyComponent/Exe/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring myprog-0.1.0.0... # Setup build Preprocessing executable 'myprog' for myprog-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.cabal.out b/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.cabal.out index 789127dcd6d..0b2e31de1bc 100644 --- a/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.cabal.out +++ b/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library for p-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/CustomPlain/setup.test.hs b/cabal-testsuite/PackageTests/CustomPlain/setup.test.hs index 1f2a445b1db..29c446dc905 100644 --- a/cabal-testsuite/PackageTests/CustomPlain/setup.test.hs +++ b/cabal-testsuite/PackageTests/CustomPlain/setup.test.hs @@ -1,5 +1,5 @@ import Test.Cabal.Prelude -main = setupAndCabalTest $ do +main = setupTest $ do skipUnless =<< hasCabalForGhc -- On Travis OSX, Cabal shipped with GHC 7.8 does not work -- with error "setup: /usr/bin/ar: permission denied"; see diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/Setup.hs b/cabal-testsuite/PackageTests/CustomPreProcess/Setup.hs index 18252a186d9..b877d7d8077 100644 --- a/cabal-testsuite/PackageTests/CustomPreProcess/Setup.hs +++ b/cabal-testsuite/PackageTests/CustomPreProcess/Setup.hs @@ -1,5 +1,14 @@ +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall #-} +-- The logic here is tricky. +-- If this is compiled by cabal-install, then the MIN_VERSION_Cabal is set +-- otherwise, we are compiling against Cabal library under test, +-- which is new! +#ifndef MIN_VERSION_Cabal +#define MIN_VERSION_Cabal(x,y,z) 1 +#endif + import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo @@ -13,8 +22,13 @@ main :: IO () main = defaultMainWithHooks simpleUserHooks { hookedPreProcessors = [("pre", myCustomPreprocessor)] } where +#if MIN_VERSION_Cabal(2,0,0) myCustomPreprocessor :: BuildInfo -> LocalBuildInfo -> ComponentLocalBuildInfo -> PreProcessor myCustomPreprocessor _bi lbi _clbi = +#else + myCustomPreprocessor :: BuildInfo -> LocalBuildInfo -> PreProcessor + myCustomPreprocessor _bi lbi = +#endif PreProcessor { platformIndependent = True, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.out b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.out new file mode 100644 index 00000000000..c5275c1aaac --- /dev/null +++ b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.out @@ -0,0 +1,2 @@ +# internal-preprocessor-test hello-world +hello from A diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.project b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.project new file mode 100644 index 00000000000..c314e91f2af --- /dev/null +++ b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.project @@ -0,0 +1,2 @@ +-- remove me when `v2-build -z` is implemented +packages: . diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs new file mode 100644 index 00000000000..6400d951331 --- /dev/null +++ b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs @@ -0,0 +1,13 @@ +import Test.Cabal.Prelude +-- Test internal custom preprocessor +main = cabalTest $ do + skipUnless =<< hasCabalForGhc + + -- old Cabal's ./Setup.hs output is difficult to normalise + recordMode DoNotRecord $ + cabal "v2-build" [] + + -- here, we only care that result works: + withPlan $ do + r <- runPlanExe' "internal-preprocessor-test" "hello-world" [] + assertOutputContains "hello from A" r diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/internal-preprocessor-test.cabal b/cabal-testsuite/PackageTests/CustomPreProcess/internal-preprocessor-test.cabal index 26735e39fa5..e70897a3b92 100644 --- a/cabal-testsuite/PackageTests/CustomPreProcess/internal-preprocessor-test.cabal +++ b/cabal-testsuite/PackageTests/CustomPreProcess/internal-preprocessor-test.cabal @@ -9,6 +9,9 @@ category: Testing build-type: Custom cabal-version: >=1.10 +custom-setup + setup-depends: Cabal, base, process, filepath + -- Note that exe comes before the library. -- The reason is backwards compat: old versions of Cabal (< 1.18) -- don't have a proper component build graph, so components are diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/setup.test.hs b/cabal-testsuite/PackageTests/CustomPreProcess/setup.test.hs index 63c91f87441..2f9dcc38616 100644 --- a/cabal-testsuite/PackageTests/CustomPreProcess/setup.test.hs +++ b/cabal-testsuite/PackageTests/CustomPreProcess/setup.test.hs @@ -1,6 +1,6 @@ import Test.Cabal.Prelude -- Test internal custom preprocessor -main = setupAndCabalTest $ do +main = setupTest $ do skipUnless =<< hasCabalForGhc setup_build [] runExe' "hello-world" [] diff --git a/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.cabal.out b/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.cabal.out index d10d1eb17c3..f2bdd981031 100644 --- a/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.cabal.out +++ b/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring DeterministicAr-0... # Setup build Preprocessing library for DeterministicAr-0.. diff --git a/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.cabal.out b/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.cabal.out index d10d1eb17c3..f2bdd981031 100644 --- a/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.cabal.out +++ b/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring DeterministicAr-0... # Setup build Preprocessing library for DeterministicAr-0.. diff --git a/cabal-testsuite/PackageTests/DuplicateModuleName/setup.cabal.out b/cabal-testsuite/PackageTests/DuplicateModuleName/setup.cabal.out index 99d15e0aa98..c9512da4681 100644 --- a/cabal-testsuite/PackageTests/DuplicateModuleName/setup.cabal.out +++ b/cabal-testsuite/PackageTests/DuplicateModuleName/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring DuplicateModuleName-0.1.0.0... # Setup build Preprocessing library for DuplicateModuleName-0.1.0.0.. @@ -9,20 +8,12 @@ Building test suite 'foo' for DuplicateModuleName-0.1.0.0.. Preprocessing test suite 'foo2' for DuplicateModuleName-0.1.0.0.. Building test suite 'foo2' for DuplicateModuleName-0.1.0.0.. # Setup test -Preprocessing library for DuplicateModuleName-0.1.0.0.. -Building library for DuplicateModuleName-0.1.0.0.. -Preprocessing test suite 'foo' for DuplicateModuleName-0.1.0.0.. -Building test suite 'foo' for DuplicateModuleName-0.1.0.0.. Running 1 test suites... Test suite foo: RUNNING... Test suite foo: FAIL Test suite logged to: setup.cabal.dist/work/dist/test/DuplicateModuleName-0.1.0.0-foo.log 0 of 1 test suites (0 of 2 test cases) passed. # Setup test -Preprocessing library for DuplicateModuleName-0.1.0.0.. -Building library for DuplicateModuleName-0.1.0.0.. -Preprocessing test suite 'foo2' for DuplicateModuleName-0.1.0.0.. -Building test suite 'foo2' for DuplicateModuleName-0.1.0.0.. Running 1 test suites... Test suite foo2: RUNNING... Test suite foo2: FAIL diff --git a/cabal-testsuite/PackageTests/EmptyLib/setup.cabal.out b/cabal-testsuite/PackageTests/EmptyLib/setup.cabal.out index f605652c3b1..a99b6c1357d 100644 --- a/cabal-testsuite/PackageTests/EmptyLib/setup.cabal.out +++ b/cabal-testsuite/PackageTests/EmptyLib/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring emptyLib-1.0... # Setup build Preprocessing library for emptyLib-1.0.. diff --git a/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectory/setup.cabal.out b/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectory/setup.cabal.out index a761d18c8c8..41135867a40 100644 --- a/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectory/setup.cabal.out +++ b/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectory/setup.cabal.out @@ -1,2 +1,3 @@ # Setup configure +Configuring SameDirectory-0.1.0.0... cabal: Version mismatch between ghc and ghc-pkg: /./ghc is version /./ghc-pkg is version 9999999 diff --git a/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/setup.cabal.out b/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/setup.cabal.out index 2ea638abe4c..b2073bea4f7 100644 --- a/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/setup.cabal.out +++ b/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/setup.cabal.out @@ -1,2 +1,3 @@ # Setup configure +Configuring SameDirectory-0.1.0.0... cabal: Version mismatch between ghc and ghc-pkg: /./ghc-7.10 is version /./ghc-pkg-ghc-7.10 is version 9999999 diff --git a/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryVersion/setup.cabal.out b/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryVersion/setup.cabal.out index a1f199bbf65..a4e757f2721 100644 --- a/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryVersion/setup.cabal.out +++ b/cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryVersion/setup.cabal.out @@ -1,2 +1,3 @@ # Setup configure +Configuring SameDirectory-0.1.0.0... cabal: Version mismatch between ghc and ghc-pkg: /./ghc-7.10 is version /./ghc-pkg-7.10 is version 9999999 diff --git a/cabal-testsuite/PackageTests/GhcPkgGuess/Symlink/setup.cabal.out b/cabal-testsuite/PackageTests/GhcPkgGuess/Symlink/setup.cabal.out index bd2f8de689e..7beaec84ee0 100644 --- a/cabal-testsuite/PackageTests/GhcPkgGuess/Symlink/setup.cabal.out +++ b/cabal-testsuite/PackageTests/GhcPkgGuess/Symlink/setup.cabal.out @@ -1,2 +1,3 @@ # Setup configure +Configuring SameDirectory-0.1.0.0... cabal: Version mismatch between ghc and ghc-pkg: /./ghc is version /bin/ghc-pkg is version 9999999 diff --git a/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkGhcVersion/setup.cabal.out b/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkGhcVersion/setup.cabal.out index a3d80af2509..b18d597fe0d 100644 --- a/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkGhcVersion/setup.cabal.out +++ b/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkGhcVersion/setup.cabal.out @@ -1,2 +1,3 @@ # Setup configure +Configuring SameDirectory-0.1.0.0... cabal: Version mismatch between ghc and ghc-pkg: /./ghc is version /bin/ghc-pkg-7.10 is version 9999999 diff --git a/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkVersion/setup.cabal.out b/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkVersion/setup.cabal.out index 4670bc3885e..9eeae3000db 100644 --- a/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkVersion/setup.cabal.out +++ b/cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkVersion/setup.cabal.out @@ -1,2 +1,3 @@ # Setup configure +Configuring SameDirectory-0.1.0.0... cabal: Version mismatch between ghc and ghc-pkg: /./ghc is version /bin/ghc-pkg-ghc-7.10 is version 9999999 diff --git a/cabal-testsuite/PackageTests/Haddock/setup.cabal.out b/cabal-testsuite/PackageTests/Haddock/setup.cabal.out index 0cccb058161..09430defb6f 100644 --- a/cabal-testsuite/PackageTests/Haddock/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Haddock/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring Haddock-0.1... # Setup haddock Preprocessing library for Haddock-0.1.. diff --git a/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out b/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out index d588ae68300..a0978c99d95 100644 --- a/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out +++ b/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring HaddockNewline-0.1.0.0... # Setup haddock Preprocessing library for HaddockNewline-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/InternalLibraries/Executable/setup-static.cabal.out b/cabal-testsuite/PackageTests/InternalLibraries/Executable/setup-static.cabal.out index 8ac93b9e717..be4efcacf1e 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/Executable/setup-static.cabal.out +++ b/cabal-testsuite/PackageTests/InternalLibraries/Executable/setup-static.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring foo-0.1.0.0... # Setup build Preprocessing library 'foo-internal' for foo-0.1.0.0.. @@ -17,7 +16,6 @@ cleaning... # foo 46 # Setup configure -Resolving dependencies... Configuring foo-0.1.0.0... # Setup build Preprocessing library 'foo-internal' for foo-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.cabal.out b/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.cabal.out index 1c124540c69..189f4b52254 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring foolib-0.1.0.0... Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. # Setup build @@ -14,7 +13,6 @@ Installing library in Registering library 'foolib-internal' for foolib-0.1.0.0.. Registering library for foolib-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring fooexe-0.1.0.0... # Setup build Preprocessing executable 'fooexe' for fooexe-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.cabal.out b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.cabal.out index eb872a3a8c1..68d3af9b7ec 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.cabal.out +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library 'q' for p-0.1.0.0.. @@ -15,7 +14,6 @@ Warning: The directory /setup-gen-pkg-config.cabal.dist/usr/bin is not in Installing library in # Setup register # Setup configure -Resolving dependencies... Configuring r-0.1.0.0... # Setup build Preprocessing library for r-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.cabal.out b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.cabal.out index fdaf3951fce..d637aef7a59 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.cabal.out +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library 'q' for p-0.1.0.0.. @@ -15,7 +14,6 @@ Warning: The directory /setup-gen-script.cabal.dist/usr/bin is not in the Installing library in # Setup register # Setup configure -Resolving dependencies... Configuring r-0.1.0.0... # Setup build Preprocessing library for r-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup.cabal.out b/cabal-testsuite/PackageTests/InternalLibraries/setup.cabal.out index 79da69f77df..4c27ce9bd84 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring q-0.1.0.0... # Setup build Preprocessing library for q-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for q-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library 'q' for p-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/InternalVersions/BuildDependsBad/setup.cabal.out b/cabal-testsuite/PackageTests/InternalVersions/BuildDependsBad/setup.cabal.out index 2982e863b27..1cfda1ce573 100644 --- a/cabal-testsuite/PackageTests/InternalVersions/BuildDependsBad/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalVersions/BuildDependsBad/setup.cabal.out @@ -1,11 +1,3 @@ # Setup configure -Resolving dependencies... -Warning: solver failed to find a solution: -Could not resolve dependencies: -[__0] next goal: build-depends-bad-version (user goal) -[__0] rejecting: build-depends-bad-version-0.1.0.0 (conflict: build-depends-bad-version==0.1.0.0, build-depends-bad-version => build-depends-bad-version>=2) -[__0] fail (backjumping, conflict set: build-depends-bad-version) -After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: build-depends-bad-version (2) -Trying configure anyway. Configuring build-depends-bad-version-0.1.0.0... cabal: The package has an impossible version range for a dependency on an internal library: build-depends-bad-version >=2. This version range does not include the current package, and must be removed as the current package's library will always be used. diff --git a/cabal-testsuite/PackageTests/InternalVersions/BuildDependsExtra/setup.cabal.out b/cabal-testsuite/PackageTests/InternalVersions/BuildDependsExtra/setup.cabal.out index adc6f5a04dd..13411b9dcae 100644 --- a/cabal-testsuite/PackageTests/InternalVersions/BuildDependsExtra/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalVersions/BuildDependsExtra/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring build-depends-extra-version-0.1.0.0... Warning: The package has an extraneous version range for a dependency on an internal library: build-depends-extra-version >=0.0.0.1. This version range includes the current package but isn't needed as the current package's library will always be used. # Setup sdist diff --git a/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsBad/setup.cabal.out b/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsBad/setup.cabal.out index e897a44ebf6..cd911781c66 100644 --- a/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsBad/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsBad/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring build-tool-depends-bad-version-0.1.0.0... cabal: The package has an impossible version range for a dependency on an internal executable: build-tool-depends-bad-version:hello-world >=2. This version range does not include the current package, and must be removed as the current package's executable will always be used. diff --git a/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsExtra/setup.cabal.out b/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsExtra/setup.cabal.out index 95e8ec2bafa..34d46ff3abe 100644 --- a/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsExtra/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalVersions/BuildToolDependsExtra/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring build-tool-depends-extra-version-0.1.0.0... Warning: The package has an extraneous version range for a dependency on an internal executable: build-tool-depends-extra-version:hello-world >=0.0.0.1. This version range includes the current package but isn't needed as the current package's executable will always be used. # Setup sdist diff --git a/cabal-testsuite/PackageTests/InternalVersions/BuildToolsBad/setup.cabal.out b/cabal-testsuite/PackageTests/InternalVersions/BuildToolsBad/setup.cabal.out index 5e5b0e882cd..7c767e83c46 100644 --- a/cabal-testsuite/PackageTests/InternalVersions/BuildToolsBad/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalVersions/BuildToolsBad/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring build-tools-bad-version-0.1.0.0... cabal: The package has an impossible version range for a dependency on an internal executable: build-tools-bad-version:hello-world >=2. This version range does not include the current package, and must be removed as the current package's executable will always be used. diff --git a/cabal-testsuite/PackageTests/InternalVersions/BuildToolsExtra/setup.cabal.out b/cabal-testsuite/PackageTests/InternalVersions/BuildToolsExtra/setup.cabal.out index cc7004fa021..9770a60d9ff 100644 --- a/cabal-testsuite/PackageTests/InternalVersions/BuildToolsExtra/setup.cabal.out +++ b/cabal-testsuite/PackageTests/InternalVersions/BuildToolsExtra/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring build-tools-extra-version-0.1.0.0... Warning: The package has an extraneous version range for a dependency on an internal executable: build-tools-extra-version:hello-world >=0.0.0.1. This version range includes the current package but isn't needed as the current package's executable will always be used. # Setup sdist diff --git a/cabal-testsuite/PackageTests/Macros/setup.cabal.out b/cabal-testsuite/PackageTests/Macros/setup.cabal.out index e11289289c5..c13ed7948c3 100644 --- a/cabal-testsuite/PackageTests/Macros/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Macros/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring macros-0.1.0.0... # Setup build Preprocessing library for macros-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/OrderFlags/setup.cabal.out b/cabal-testsuite/PackageTests/OrderFlags/setup.cabal.out index ca38c9bb931..a6305e6cd75 100644 --- a/cabal-testsuite/PackageTests/OrderFlags/setup.cabal.out +++ b/cabal-testsuite/PackageTests/OrderFlags/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring OrderFlags-0.1... # Setup build Preprocessing library for OrderFlags-0.1.. diff --git a/cabal-testsuite/PackageTests/PathsModule/Executable/setup.cabal.out b/cabal-testsuite/PackageTests/PathsModule/Executable/setup.cabal.out index 1b2ee7448f2..bead24d62fd 100644 --- a/cabal-testsuite/PackageTests/PathsModule/Executable/setup.cabal.out +++ b/cabal-testsuite/PackageTests/PathsModule/Executable/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring PathsModule-0.1... # Setup build Preprocessing executable 'TestPathsModule' for PathsModule-0.1.. diff --git a/cabal-testsuite/PackageTests/PathsModule/Library/setup.cabal.out b/cabal-testsuite/PackageTests/PathsModule/Library/setup.cabal.out index 9b6a5f69076..8d21f201844 100644 --- a/cabal-testsuite/PackageTests/PathsModule/Library/setup.cabal.out +++ b/cabal-testsuite/PackageTests/PathsModule/Library/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring PathsModule-0.1... # Setup build Preprocessing library for PathsModule-0.1.. diff --git a/cabal-testsuite/PackageTests/PreProcess/setup.cabal.out b/cabal-testsuite/PackageTests/PreProcess/setup.cabal.out index 488ccc02d2a..ab77a57da1b 100644 --- a/cabal-testsuite/PackageTests/PreProcess/setup.cabal.out +++ b/cabal-testsuite/PackageTests/PreProcess/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring PreProcess-0.1... # Setup build Preprocessing test suite 'my-test-suite' for PreProcess-0.1.. diff --git a/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.cabal.out b/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.cabal.out index 2ae8ad318a5..b68df85ec46 100644 --- a/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.cabal.out +++ b/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring PreProcessExtraSources-0.1... # Setup build Preprocessing test suite 'my-test-suite' for PreProcessExtraSources-0.1.. diff --git a/cabal-testsuite/PackageTests/QuasiQuotes/dynamic/setup.cabal.out b/cabal-testsuite/PackageTests/QuasiQuotes/dynamic/setup.cabal.out index 0f5c034c61c..5fb92491c45 100644 --- a/cabal-testsuite/PackageTests/QuasiQuotes/dynamic/setup.cabal.out +++ b/cabal-testsuite/PackageTests/QuasiQuotes/dynamic/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring quasiQuotes-0.1... # Setup build Preprocessing executable 'main' for quasiQuotes-0.1.. diff --git a/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.cabal.out b/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.cabal.out index 0f5c034c61c..5fb92491c45 100644 --- a/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.cabal.out +++ b/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring quasiQuotes-0.1... # Setup build Preprocessing executable 'main' for quasiQuotes-0.1.. diff --git a/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.cabal.out b/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.cabal.out index 0f5c034c61c..5fb92491c45 100644 --- a/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.cabal.out +++ b/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring quasiQuotes-0.1... # Setup build Preprocessing executable 'main' for quasiQuotes-0.1.. diff --git a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.cabal.out b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.cabal.out index ad978f72266..b62fdcd8235 100644 --- a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.cabal.out +++ b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring containers-dupe-0.1.0.0... # Setup build Preprocessing library for containers-dupe-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for containers-dupe-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... Error: Problem with module re-exports: diff --git a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-missing.cabal.out b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-missing.cabal.out index b30e7d93526..9283ea2ea31 100644 --- a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-missing.cabal.out +++ b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-missing.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... Error: Problem with module re-exports: diff --git a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-other.cabal.out b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-other.cabal.out index 9ec5320075b..4f5433c09d6 100644 --- a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-other.cabal.out +++ b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-other.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... Error: Problem with module re-exports: diff --git a/cabal-testsuite/PackageTests/ReexportedModules/setup.cabal.out b/cabal-testsuite/PackageTests/ReexportedModules/setup.cabal.out index 1da07fe8bb2..3f418df5e88 100644 --- a/cabal-testsuite/PackageTests/ReexportedModules/setup.cabal.out +++ b/cabal-testsuite/PackageTests/ReexportedModules/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library for p-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for p-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring q-0.1.0.0... # Setup build Preprocessing library for q-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Regression/T2755/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T2755/setup.cabal.out index 8873a7c1dde..5c40d5560bf 100644 --- a/cabal-testsuite/PackageTests/Regression/T2755/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T2755/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring test-t2755-0.1.0.0... # Setup test -Package has no buildable test suites. +Package has no test suites. diff --git a/cabal-testsuite/PackageTests/Regression/T2971/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T2971/setup.cabal.out index 21fde8e6e5c..3bc9c42902f 100644 --- a/cabal-testsuite/PackageTests/Regression/T2971/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T2971/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring p-0.1.0.0... # Setup build Preprocessing library for p-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for p-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring q-0.1.0.0... # Setup build Preprocessing executable 'foo' for q-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Regression/T2971a/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T2971a/setup.cabal.out index e0c5ef91692..9a4398aa230 100644 --- a/cabal-testsuite/PackageTests/Regression/T2971a/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T2971a/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring T2971a-0.1.0.0... # Setup build Preprocessing library for T2971a-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Regression/T3294/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T3294/setup.cabal.out index b9a85788fc3..69f9d047ba0 100644 --- a/cabal-testsuite/PackageTests/Regression/T3294/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T3294/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring T3294-0.1.0.0... # Setup build Preprocessing executable 'T3294' for T3294-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Regression/T3847/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T3847/setup.cabal.out index 65b0fd15657..df940b2d616 100644 --- a/cabal-testsuite/PackageTests/Regression/T3847/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T3847/setup.cabal.out @@ -1,4 +1,3 @@ # Setup configure -Resolving dependencies... Configuring T3847-1.0... Warning: Unknown extensions: ThisDoesNotExist diff --git a/cabal-testsuite/PackageTests/Regression/T4025/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T4025/setup.cabal.out index 26c58f32f48..760158d6c88 100644 --- a/cabal-testsuite/PackageTests/Regression/T4025/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T4025/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring T4025-1.0... Warning: Packages using 'cabal-version: >= 1.10' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field. # Setup build diff --git a/cabal-testsuite/PackageTests/Regression/T4270/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T4270/setup.cabal.out index 08b08017823..7640e1883d5 100644 --- a/cabal-testsuite/PackageTests/Regression/T4270/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T4270/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring T4270-0.1... # Setup build Preprocessing library for T4270-0.1.. @@ -7,10 +6,6 @@ Building library for T4270-0.1.. Preprocessing test suite 'test' for T4270-0.1.. Building test suite 'test' for T4270-0.1.. # Setup test -Preprocessing library for T4270-0.1.. -Building library for T4270-0.1.. -Preprocessing test suite 'test' for T4270-0.1.. -Building test suite 'test' for T4270-0.1.. Running 1 test suites... Test suite test: RUNNING... Test suite test: PASS diff --git a/cabal-testsuite/PackageTests/Regression/T4291/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T4291/setup.cabal.out index 5e5f38ab948..89263ca9e59 100644 --- a/cabal-testsuite/PackageTests/Regression/T4291/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T4291/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring dependee-0.1.0.0... # Setup build Preprocessing library for dependee-0.1.0.0.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for dependee-0.1.0.0.. # Setup configure -Resolving dependencies... Configuring depender-0.1.0.0... # Setup build Preprocessing library for depender-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Regression/T4449/setup.out b/cabal-testsuite/PackageTests/Regression/T4449/setup.out index e9421679248..54c6216605a 100644 --- a/cabal-testsuite/PackageTests/Regression/T4449/setup.out +++ b/cabal-testsuite/PackageTests/Regression/T4449/setup.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring test-t4449-0.1.0.0... # Setup build Preprocessing library for test-t4449-0.1.0.0.. diff --git a/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out index 64e8312ccdd..1ac8e48f8eb 100644 --- a/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out +++ b/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring myprog-0... # Setup build Preprocessing executable 'myprog' for myprog-0.. diff --git a/cabal-testsuite/PackageTests/SPDX/cabal-old-build.cabal.out b/cabal-testsuite/PackageTests/SPDX/cabal-old-build.cabal.out index 542c554a71d..3b4f4f81c46 100644 --- a/cabal-testsuite/PackageTests/SPDX/cabal-old-build.cabal.out +++ b/cabal-testsuite/PackageTests/SPDX/cabal-old-build.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring my-0... # Setup build Preprocessing library for my-0.. diff --git a/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs b/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs index e8a722e0f48..98def645f5e 100644 --- a/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs +++ b/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs @@ -1,8 +1,5 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ withPackageDb $ do - -- skip for GHC-8.4 and GHC-head until their Cabal modules are updated. - skipUnless =<< ghcVersionIs (< mkVersion [8,3]) - setup_install [] recordMode DoNotRecord $ do ghc84 <- ghcVersionIs (>= mkVersion [8,4]) diff --git a/cabal-testsuite/PackageTests/TemplateHaskell/dynamic/setup.cabal.out b/cabal-testsuite/PackageTests/TemplateHaskell/dynamic/setup.cabal.out index 574c03b02c7..65416c08cbe 100644 --- a/cabal-testsuite/PackageTests/TemplateHaskell/dynamic/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TemplateHaskell/dynamic/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring templateHaskell-0.1... # Setup build Preprocessing executable 'main' for templateHaskell-0.1.. diff --git a/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.cabal.out b/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.cabal.out index 574c03b02c7..65416c08cbe 100644 --- a/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring templateHaskell-0.1... # Setup build Preprocessing executable 'main' for templateHaskell-0.1.. diff --git a/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.cabal.out b/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.cabal.out index 574c03b02c7..65416c08cbe 100644 --- a/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring templateHaskell-0.1... # Setup build Preprocessing executable 'main' for templateHaskell-0.1.. diff --git a/cabal-testsuite/PackageTests/TestNameCollision/setup.cabal.out b/cabal-testsuite/PackageTests/TestNameCollision/setup.cabal.out index b6d131d3525..866529df42d 100644 --- a/cabal-testsuite/PackageTests/TestNameCollision/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TestNameCollision/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring parent-0.1... # Setup build Preprocessing library for parent-0.1.. @@ -9,7 +8,6 @@ Installing library in # Setup register Registering library for parent-0.1.. # Setup configure -Resolving dependencies... Configuring child-0.1... # Setup build Preprocessing library for child-0.1.. @@ -17,10 +15,6 @@ Building library for child-0.1.. Preprocessing test suite 'parent' for child-0.1.. Building test suite 'parent' for child-0.1.. # Setup test -Preprocessing library for child-0.1.. -Building library for child-0.1.. -Preprocessing test suite 'parent' for child-0.1.. -Building test suite 'parent' for child-0.1.. Running 1 test suites... Test suite parent: RUNNING... Test suite parent: PASS diff --git a/cabal-testsuite/PackageTests/TestOptions/setup.cabal.out b/cabal-testsuite/PackageTests/TestOptions/setup.cabal.out index 35336b7c528..ce66cbfe74e 100644 --- a/cabal-testsuite/PackageTests/TestOptions/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TestOptions/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring TestOptions-0.1... # Setup build Preprocessing test suite 'test-TestOptions' for TestOptions-0.1.. @@ -7,16 +6,12 @@ Building test suite 'test-TestOptions' for TestOptions-0.1.. Preprocessing executable 'dummy' for TestOptions-0.1.. Building executable 'dummy' for TestOptions-0.1.. # Setup test -Preprocessing test suite 'test-TestOptions' for TestOptions-0.1.. -Building test suite 'test-TestOptions' for TestOptions-0.1.. Running 1 test suites... Test suite test-TestOptions: RUNNING... Test suite test-TestOptions: PASS Test suite logged to: setup.cabal.dist/work/dist/test/TestOptions-0.1-test-TestOptions.log 1 of 1 test suites (1 of 1 test cases) passed. # Setup test -Preprocessing test suite 'test-TestOptions' for TestOptions-0.1.. -Building test suite 'test-TestOptions' for TestOptions-0.1.. Running 1 test suites... Test suite test-TestOptions: RUNNING... Test suite test-TestOptions: PASS diff --git a/cabal-testsuite/PackageTests/TestStanza/setup.cabal.out b/cabal-testsuite/PackageTests/TestStanza/setup.cabal.out index f43d9682540..a03c9110835 100644 --- a/cabal-testsuite/PackageTests/TestStanza/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TestStanza/setup.cabal.out @@ -1,3 +1,2 @@ # Setup configure -Resolving dependencies... Configuring TestStanza-0.1... diff --git a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.cabal.out b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.cabal.out index 1a6200f2755..de1e4e9a7e1 100644 --- a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.cabal.out +++ b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring my-0.1... # Setup build Preprocessing library for my-0.1.. @@ -9,10 +8,6 @@ Building test suite 'test-Foo' for my-0.1.. Preprocessing test suite 'test-Short' for my-0.1.. Building test suite 'test-Short' for my-0.1.. # Setup test -Preprocessing library for my-0.1.. -Building library for my-0.1.. -Preprocessing test suite 'test-Short' for my-0.1.. -Building test suite 'test-Short' for my-0.1.. Running 1 test suites... Test suite test-Short: RUNNING... Test suite test-Short: PASS diff --git a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.cabal.out b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.cabal.out index 100aa6d3922..eaba6518b30 100644 --- a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.cabal.out +++ b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring my-0.1... # Setup build Preprocessing library for my-0.1.. @@ -9,10 +8,6 @@ Building test suite 'test-Foo' for my-0.1.. Preprocessing test suite 'test-Short' for my-0.1.. Building test suite 'test-Short' for my-0.1.. # Setup test -Preprocessing library for my-0.1.. -Building library for my-0.1.. -Preprocessing test suite 'test-Short' for my-0.1.. -Building test suite 'test-Short' for my-0.1.. Running 1 test suites... Test suite test-Short: RUNNING... Test suite test-Short: PASS diff --git a/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup-deadlock.cabal.out b/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup-deadlock.cabal.out index 868691f22c3..df53409394d 100644 --- a/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup-deadlock.cabal.out +++ b/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup-deadlock.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring LibV09-0.1... # Setup build Preprocessing library for LibV09-0.1.. @@ -7,10 +6,6 @@ Building library for LibV09-0.1.. Preprocessing test suite 'LibV09-Deadlock' for LibV09-0.1.. Building test suite 'LibV09-Deadlock' for LibV09-0.1.. # Setup test -Preprocessing library for LibV09-0.1.. -Building library for LibV09-0.1.. -Preprocessing test suite 'LibV09-Deadlock' for LibV09-0.1.. -Building test suite 'LibV09-Deadlock' for LibV09-0.1.. Running 1 test suites... Test suite LibV09-Deadlock: RUNNING... Test suite LibV09-Deadlock: FAIL diff --git a/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup.cabal.out b/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup.cabal.out index ac464158da1..1765b626f96 100644 --- a/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup.cabal.out +++ b/cabal-testsuite/PackageTests/TestSuiteTests/LibV09/setup.cabal.out @@ -1,5 +1,4 @@ # Setup configure -Resolving dependencies... Configuring LibV09-0.1... # Setup build Preprocessing library for LibV09-0.1.. diff --git a/cabal-testsuite/PackageTests/UniqueIPID/setup.cabal.out b/cabal-testsuite/PackageTests/UniqueIPID/setup.cabal.out index c699145d50a..25bf83f0da1 100644 --- a/cabal-testsuite/PackageTests/UniqueIPID/setup.cabal.out +++ b/cabal-testsuite/PackageTests/UniqueIPID/setup.cabal.out @@ -1,8 +1,6 @@ # Setup configure -Resolving dependencies... Configuring UniqueIPID-0.1... # Setup configure -Resolving dependencies... Configuring UniqueIPID-0.1... # Setup build Preprocessing library for UniqueIPID-0.1.. diff --git a/cabal-testsuite/src/Test/Cabal/Monad.hs b/cabal-testsuite/src/Test/Cabal/Monad.hs index b36913e8975..839beb866e2 100644 --- a/cabal-testsuite/src/Test/Cabal/Monad.hs +++ b/cabal-testsuite/src/Test/Cabal/Monad.hs @@ -413,11 +413,14 @@ mkNormalizerEnv = do -- to remember what it is list_out <- liftIO $ readProcess (programPath ghc_pkg_program) ["list", "--global", "--simple-output"] "" + tmpDir <- liftIO $ getTemporaryDirectory return NormalizerEnv { normalizerRoot = addTrailingPathSeparator (testSourceDir env), normalizerTmpDir = addTrailingPathSeparator (testTmpDir env), + normalizerGblTmpDir + = addTrailingPathSeparator tmpDir, normalizerGhcVersion = compilerVersion (testCompiler env), normalizerKnownPackages diff --git a/cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs b/cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs index 31fef0f47bd..fd7457b3324 100644 --- a/cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs +++ b/cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs @@ -30,6 +30,7 @@ normalizeOutput nenv = -- This is dumb but I don't feel like pulling in another dep for -- string search-replace. Make sure we do this before backslash -- normalization! + . resub (posixRegexEscape (normalizerGblTmpDir nenv) ++ "[a-z0-9.-]+") "" -- note, after TMPDIR . resub (posixRegexEscape (normalizerRoot nenv)) "/" . resub (posixRegexEscape (normalizerTmpDir nenv)) "/" . appEndo (F.fold (map (Endo . packageIdRegex) (normalizerKnownPackages nenv))) @@ -61,6 +62,7 @@ normalizeOutput nenv = data NormalizerEnv = NormalizerEnv { normalizerRoot :: FilePath , normalizerTmpDir :: FilePath + , normalizerGblTmpDir :: FilePath , normalizerGhcVersion :: Version , normalizerKnownPackages :: [PackageId] , normalizerPlatform :: Platform diff --git a/cabal-testsuite/src/Test/Cabal/Prelude.hs b/cabal-testsuite/src/Test/Cabal/Prelude.hs index 4acbcca8846..2b51b203902 100644 --- a/cabal-testsuite/src/Test/Cabal/Prelude.hs +++ b/cabal-testsuite/src/Test/Cabal/Prelude.hs @@ -162,48 +162,31 @@ setup'' prefix cmd args = do full_args = cmd :| [marked_verbose, "--distdir", rel_dist_dir] ++ args' defaultRecordMode RecordMarked $ do recordHeader ["Setup", cmd] + + -- We test `cabal act-act-setup` when running cabal-tests. + -- + -- `cabal` and `Setup.hs` do have different interface. + -- + + pdfile <- liftIO $ tryFindPackageDesc (testVerbosity env) (testCurrentDir env prefix) + pdesc <- liftIO $ readGenericPackageDescription (testVerbosity env) pdfile if testCabalInstallAsSetup env - then - -- `cabal` and `Setup` no longer have the same interface. - -- A bit of fettling is required to hide this fact. - let - legacyCmds = - [ "build" - , "configure" - , "repl" - , "freeze" - , "run" - , "test" - , "bench" - , "haddock" - , "exec" - , "update" - , "install" - , "clean" - , "register" - , "copy" - , "sdist" - , "reconfigure" - , "doctest" - ] - (a:|as) = full_args - full_args' = if a `elem` legacyCmds then ("v1-" ++ a) : as else a:as - in runProgramM cabalProgram full_args' - else do - pdfile <- liftIO $ tryFindPackageDesc (testVerbosity env) - (testCurrentDir env prefix) - pdesc <- liftIO $ readGenericPackageDescription (testVerbosity env) pdfile - if buildType (packageDescription pdesc) == Simple - then runM (testSetupPath env) (NE.toList full_args) - -- Run the Custom script! - else do - r <- liftIO $ runghc (testScriptEnv env) - (Just (testCurrentDir env)) - (testEnvironment env) - (testCurrentDir env prefix "Setup.hs") - (NE.toList full_args) - recordLog r - requireSuccess r + then if buildType (packageDescription pdesc) == Simple + then runProgramM cabalProgram ("act-as-setup" : "--" : NE.toList full_args) + else fail "Using act-as-setup for not 'build-type: Simple' package" + else do + if buildType (packageDescription pdesc) == Simple + then runM (testSetupPath env) (NE.toList full_args) + -- Run the Custom script! + else do + r <- liftIO $ runghc (testScriptEnv env) + (Just (testCurrentDir env)) + (testEnvironment env) + (testCurrentDir env prefix "Setup.hs") + (NE.toList full_args) + recordLog r + requireSuccess r + -- This code is very tempting (and in principle should be quick: -- after all we are loading the built version of Cabal), but -- actually it costs quite a bit in wallclock time (e.g. 54sec to