From d2f40f81e2abcdadf3f4389781c4cf6276a528ee Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 7 Nov 2023 09:55:25 +1100 Subject: [PATCH] CI: Tweaks * Update ghc versions used. * Disable huge number of failing test for ghc == 9.4.* on Windows. --- .github/workflows/validate.yml | 2 +- .../Ambiguity/setup-package-import.test.hs | 3 ++ .../Ambiguity/setup-reexport.test.hs | 7 +++- .../Backpack/Includes2/setup-internal.test.hs | 3 ++ .../Backpack/Includes3/setup-internal.test.hs | 3 ++ .../Backpack/Includes4/setup.test.hs | 3 ++ .../Backpack/Includes5/setup.test.hs | 3 ++ .../Backpack/Reexport1/setup.test.hs | 5 ++- .../PackageTests/Backpack/T4754/setup.test.hs | 5 ++- .../PackageTests/Backpack/T5634/setup.test.hs | 5 ++- .../BenchmarkExeV10/setup.test.hs | 6 ++- .../BuildDeps/InternalLibrary1/setup.test.hs | 6 ++- .../BuildDeps/InternalLibrary2/setup.test.hs | 14 ++++--- .../BuildDeps/InternalLibrary3/setup.test.hs | 20 ++++++---- .../BuildDeps/SameDepsAllRound/setup.test.hs | 6 ++- .../TargetSpecificDeps2/setup.test.hs | 6 ++- .../BuildTools/Internal/setup.test.hs | 3 ++ .../PackageTests/CabalMacros/setup.test.hs | 3 ++ .../PackageTests/CmmSources/setup.test.hs | 5 ++- .../PackageTests/CmmSourcesDyn/setup.test.hs | 5 ++- .../SubLib/setup-explicit-fail.test.hs | 3 ++ .../SubLib/setup-explicit.test.hs | 3 ++ .../ConfigureComponent/SubLib/setup.test.hs | 3 ++ .../ConfigureComponent/Test/setup.test.hs | 3 ++ .../CopyComponent/Lib/setup.test.hs | 3 ++ .../PackageTests/CopyHie/setup.test.hs | 14 ++++--- .../DeterministicAr/setup-default-ar.test.hs | 3 ++ .../setup-old-ar-without-at-args.test.hs | 3 ++ .../InternalLibraries/Haddock/haddock.test.hs | 5 ++- .../InternalLibraries/Library/setup.test.hs | 5 ++- .../setup-gen-pkg-config.test.hs | 3 ++ .../setup-gen-script.test.hs | 6 ++- .../setup-per-component.test.hs | 3 ++ .../InternalLibraries/setup.test.hs | 3 ++ .../PackageTests/Macros/setup.test.hs | 3 ++ .../MultipleLibraries/T6894/setup.test.hs | 3 ++ .../MultipleLibraries/T7270/cabal.test.hs | 11 ++++-- .../PackageTests/OrderFlags/setup.test.hs | 6 ++- .../PackageDB/cabal-fail-no-base.test.hs | 5 ++- .../PackageDB/cabal-fail-no-p.test.hs | 3 ++ .../PackageDB/cabal-manual-packagedb.test.hs | 3 ++ .../PackageDB/cabal-packagedb.test.hs | 3 ++ .../PackageInfoModule/Library/setup.test.hs | 6 ++- .../PathsModule/Library/setup.test.hs | 6 ++- .../MissingSafeHaskellMode/setup.test.hs | 6 ++- .../PreProcess/Basic/setup.test.hs | 6 ++- .../PreProcessExtraSources/setup.test.hs | 6 ++- .../QuasiQuotes/profiling/setup.test.hs | 3 ++ .../QuasiQuotes/vanilla/setup.test.hs | 5 ++- .../setup-fail-ambiguous.test.hs | 3 ++ .../ReexportedModules/setup.test.hs | 3 ++ .../Regression/T4449/setup.test.hs | 3 ++ .../PackageTests/SPDX/cabal-old-build.test.hs | 16 +++++--- .../ShowBuildInfo/Custom/custom.test.hs | 38 ++++++++++--------- .../TemplateHaskell/profiling/setup.test.hs | 3 ++ .../TemplateHaskell/vanilla/setup.test.hs | 5 ++- .../ExeV10/setup-no-markup.test.hs | 3 ++ .../ExeV10/setup-no-tix.test.hs | 3 ++ .../PackageTests/UniqueIPID/setup.test.hs | 15 +++++--- 59 files changed, 263 insertions(+), 77 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 3f44655fd58..8c9c3203806 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -38,7 +38,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - ghc: ["9.6.3", "9.4.7", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] + ghc: ["9.6.3", "9.4.7", "9.2.7", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"] exclude: # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356 - os: "windows-latest" diff --git a/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.test.hs b/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.test.hs index 50c09d00f4a..8889622be35 100644 --- a/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.test.hs +++ b/cabal-testsuite/PackageTests/Ambiguity/setup-package-import.test.hs @@ -3,6 +3,9 @@ import Test.Cabal.Prelude -- qualified imports. (Paper Backpack doesn't natively support -- this but we must!) main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "p" $ setup_install [] withDirectory "q" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.test.hs b/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.test.hs index a5407ce2b18..a18b6a060c6 100644 --- a/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.test.hs +++ b/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.test.hs @@ -2,8 +2,11 @@ import Test.Cabal.Prelude -- Test that we can resolve a module name ambiguity when reexporting -- by explicitly specifying what package we want. main = setupAndCabalTest $ do - skipUnlessGhcVersion ">= 7.9" - withPackageDb $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do + skipUnlessGhcVersion ">= 7.9" + withPackageDb $ do withDirectory "p" $ setup_install [] withDirectory "q" $ setup_install [] withDirectory "reexport" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.test.hs index ab1853753e2..44e79b9726b 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 8.1" withPackageDb $ do setup_install ["--cabal-file", "Includes2.cabal"] diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.test.hs index 7cecb11eb67..c8ea020f548 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 8.1" withPackageDb $ do setup_install [] diff --git a/cabal-testsuite/PackageTests/Backpack/Includes4/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes4/setup.test.hs index e2bc083d4df..adbdfa5d8e8 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes4/setup.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes4/setup.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 8.1" withPackageDb $ do setup_install [] diff --git a/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs index 265bcc1a802..af2b4a8da3f 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes5/setup.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 8.1" setup "configure" [] r <- fails $ setup' "build" [] diff --git a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.test.hs index 0070e6d5109..2fa2b191e9d 100644 --- a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do - skipUnlessGhcVersion ">= 8.1" + skipUnlessGhcVersion ">= 8.1" + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "p" $ setup_install_with_docs [] withDirectory "q" $ do diff --git a/cabal-testsuite/PackageTests/Backpack/T4754/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/T4754/setup.test.hs index 97dae2b597c..87a0b9962ea 100644 --- a/cabal-testsuite/PackageTests/Backpack/T4754/setup.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/T4754/setup.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do - skipUnlessGhcVersion ">= 8.1" + skipUnlessGhcVersion ">= 8.1" + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnless "no profiling libs" =<< hasProfiledLibraries setup "configure" ["--enable-profiling"] setup "build" [] diff --git a/cabal-testsuite/PackageTests/Backpack/T5634/setup.test.hs b/cabal-testsuite/PackageTests/Backpack/T5634/setup.test.hs index d897955dd74..ea3984dedcb 100644 --- a/cabal-testsuite/PackageTests/Backpack/T5634/setup.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/T5634/setup.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do - skipUnlessGhcVersion ">= 8.1" + skipUnlessGhcVersion ">= 8.1" + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup "configure" [] setup "build" [] diff --git a/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.test.hs b/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.test.hs index 4880f7190b4..d79d6c5e250 100644 --- a/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.test.hs +++ b/cabal-testsuite/PackageTests/BenchmarkExeV10/setup.test.hs @@ -1,3 +1,7 @@ import Test.Cabal.Prelude -- Test if exitcode-stdio-1.0 benchmark builds correctly -main = setupAndCabalTest $ setup_build ["--enable-benchmarks"] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build ["--enable-benchmarks"] diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.test.hs index 867e5777765..b0ea9bb83f5 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.test.hs +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/setup.test.hs @@ -1,4 +1,8 @@ import Test.Cabal.Prelude -- Test executable depends on internal library. -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.test.hs index e36e33823d2..c326b7da112 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.test.hs +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary2/setup.test.hs @@ -1,9 +1,13 @@ import Test.Cabal.Prelude -main = setupAndCabalTest . withPackageDb $ do - withDirectory "to-install" $ setup_install [] - setup_build [] - r <- runExe' "lemon" [] - assertEqual +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + withPackageDb $ do + withDirectory "to-install" $ setup_install [] + setup_build [] + r <- runExe' "lemon" [] + assertEqual ("executable should have linked with the internal library") ("foo foo myLibFunc internal") (concatOutput (resultOutput r)) diff --git a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.test.hs index 549e8bf8bb4..f7cad87fffc 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.test.hs +++ b/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary3/setup.test.hs @@ -1,11 +1,15 @@ import Test.Cabal.Prelude -- Test that internal library is preferred to an installed on -- with the same name and LATER version -main = setupAndCabalTest . withPackageDb $ do - withDirectory "to-install" $ setup_install [] - setup_build [] - r <- runExe' "lemon" [] - assertEqual - ("executable should have linked with the internal library") - ("foo foo myLibFunc internal") - (concatOutput (resultOutput r)) +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + withPackageDb $ do + withDirectory "to-install" $ setup_install [] + setup_build [] + r <- runExe' "lemon" [] + assertEqual + ("executable should have linked with the internal library") + ("foo foo myLibFunc internal") + (concatOutput (resultOutput r)) diff --git a/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.test.hs index 613ff39d640..60843cfb056 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.test.hs +++ b/cabal-testsuite/PackageTests/BuildDeps/SameDepsAllRound/setup.test.hs @@ -2,5 +2,9 @@ import Test.Cabal.Prelude -- Test "old build-dep behavior", where we should get the -- same package dependencies on all targets if setup-version -- is sufficiently old. -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.test.hs b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.test.hs index 27267c84362..719f53e51d3 100644 --- a/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.test.hs +++ b/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.test.hs @@ -1,4 +1,8 @@ import Test.Cabal.Prelude -- This is a control on ../TargetSpecificDeps1/setup.test.hs; it should -- succeed. -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/BuildTools/Internal/setup.test.hs b/cabal-testsuite/PackageTests/BuildTools/Internal/setup.test.hs index 8db6edcbd80..b509be67294 100644 --- a/cabal-testsuite/PackageTests/BuildTools/Internal/setup.test.hs +++ b/cabal-testsuite/PackageTests/BuildTools/Internal/setup.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- Test PATH-munging main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup_build [] runExe' "hello-world" [] >>= assertOutputContains "1111" diff --git a/cabal-testsuite/PackageTests/CabalMacros/setup.test.hs b/cabal-testsuite/PackageTests/CabalMacros/setup.test.hs index 16fdbe51277..a1d6a850f2f 100644 --- a/cabal-testsuite/PackageTests/CabalMacros/setup.test.hs +++ b/cabal-testsuite/PackageTests/CabalMacros/setup.test.hs @@ -2,6 +2,9 @@ import Test.Cabal.Prelude import qualified Data.ByteString.Char8 as BS8 main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do env <- getTestEnv let mode = testRecordMode env diff --git a/cabal-testsuite/PackageTests/CmmSources/setup.test.hs b/cabal-testsuite/PackageTests/CmmSources/setup.test.hs index 7bf57f2628f..26dd1b33744 100644 --- a/cabal-testsuite/PackageTests/CmmSources/setup.test.hs +++ b/cabal-testsuite/PackageTests/CmmSources/setup.test.hs @@ -1,7 +1,10 @@ import Test.Cabal.Prelude main = setupTest $ do - skipUnlessGhcVersion ">= 7.8" + skipUnlessGhcVersion ">= 7.8" + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup "configure" [] res <- setup' "build" [] assertOutputContains "= Post common block elimination =" res diff --git a/cabal-testsuite/PackageTests/CmmSourcesDyn/setup.test.hs b/cabal-testsuite/PackageTests/CmmSourcesDyn/setup.test.hs index 800a540696a..eb490d88805 100644 --- a/cabal-testsuite/PackageTests/CmmSourcesDyn/setup.test.hs +++ b/cabal-testsuite/PackageTests/CmmSourcesDyn/setup.test.hs @@ -1,7 +1,10 @@ import Test.Cabal.Prelude main = setupTest $ do - skipIf "ghc < 7.8" =<< isGhcVersion "< 7.8" + skipIf "ghc < 7.8" =<< isGhcVersion "< 7.8" + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup "configure" [] res <- setup' "build" [] assertOutputContains "= Post common block elimination =" res diff --git a/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit-fail.test.hs b/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit-fail.test.hs index ccae2152f9a..8242fc3d9e4 100644 --- a/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit-fail.test.hs +++ b/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit-fail.test.hs @@ -2,6 +2,9 @@ import Test.Cabal.Prelude -- NB: The --dependency flag is not supported by cabal-install main = setupTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do withPackageDb $ do base_id <- getIPID "base" setup_install ["sublib", "--cid", "sublib-0.1-abc"] diff --git a/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit.test.hs b/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit.test.hs index 49d59c69df0..ae5e8ed089f 100644 --- a/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit.test.hs +++ b/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup-explicit.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- NB: The --dependency flag is not supported by cabal-install main = setupTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do base_id <- getIPID "base" setup_install ["sublib", "--cid", "sublib-0.1-abc"] diff --git a/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup.test.hs b/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup.test.hs index bdc6ab2e602..17a24a729e2 100644 --- a/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup.test.hs +++ b/cabal-testsuite/PackageTests/ConfigureComponent/SubLib/setup.test.hs @@ -5,6 +5,9 @@ import Test.Cabal.Prelude -- a problem for you; the advised workaround is to use Setup directly -- if you need per-component builds. main = setupTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do setup_install ["sublib"] setup_install ["exe"] diff --git a/cabal-testsuite/PackageTests/ConfigureComponent/Test/setup.test.hs b/cabal-testsuite/PackageTests/ConfigureComponent/Test/setup.test.hs index 4bca4a8641b..268da3570dc 100644 --- a/cabal-testsuite/PackageTests/ConfigureComponent/Test/setup.test.hs +++ b/cabal-testsuite/PackageTests/ConfigureComponent/Test/setup.test.hs @@ -3,6 +3,9 @@ import Test.Cabal.Prelude -- dependency solver doesn't know how to solve for only -- a single component of a package. main = setupTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do setup_install ["test-for-cabal"] withDirectory "testlib" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.test.hs b/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.test.hs index 660120c3ec6..50a631e1023 100644 --- a/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.test.hs +++ b/cabal-testsuite/PackageTests/CopyComponent/Lib/setup.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- Test that per-component copy works, when only building library main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do setup "configure" [] setup "build" ["lib:p"] diff --git a/cabal-testsuite/PackageTests/CopyHie/setup.test.hs b/cabal-testsuite/PackageTests/CopyHie/setup.test.hs index fcb7b0ffc74..c04afcc5a0a 100644 --- a/cabal-testsuite/PackageTests/CopyHie/setup.test.hs +++ b/cabal-testsuite/PackageTests/CopyHie/setup.test.hs @@ -1,7 +1,11 @@ import Test.Cabal.Prelude -main = setupAndCabalTest $ withPackageDb $ do - skipUnlessGhcVersion ">= 8.8" - setup_install ["hie-local"] - env <- getTestEnv - shouldExist $ testLibInstallDir env "hie-local-0.1.0.0" "extra-compilation-artifacts" "hie" "HieLocal.hie" +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do + withPackageDb $ do + skipUnlessGhcVersion ">= 8.8" + setup_install ["hie-local"] + env <- getTestEnv + shouldExist $ testLibInstallDir env "hie-local-0.1.0.0" "extra-compilation-artifacts" "hie" "HieLocal.hie" diff --git a/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.test.hs b/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.test.hs index fc59fd54e51..e791c2f41bb 100644 --- a/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.test.hs +++ b/cabal-testsuite/PackageTests/DeterministicAr/setup-default-ar.test.hs @@ -7,6 +7,9 @@ import Test.Cabal.CheckArMetadata -- Test that setup deterministically generates object archives main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup_build [] dist_dir <- fmap testDistDir getTestEnv lbi <- getLocalBuildInfoM diff --git a/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.test.hs b/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.test.hs index 0d18b42dcf9..073ba423249 100644 --- a/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.test.hs +++ b/cabal-testsuite/PackageTests/DeterministicAr/setup-old-ar-without-at-args.test.hs @@ -7,6 +7,9 @@ import Test.Cabal.CheckArMetadata -- Test that setup deterministically generates object archives main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup_build ["--disable-response-files"] dist_dir <- fmap testDistDir getTestEnv lbi <- getLocalBuildInfoM diff --git a/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.test.hs b/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.test.hs index 27d36f9638a..007a53b077b 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.test.hs +++ b/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- https://github.com/haskell/cabal/issues/1919 -main = setupAndCabalTest $ +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do setup_install [] setup "haddock" [] diff --git a/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.test.hs b/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.test.hs index daaf862ae22..8aa02bdbc0c 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.test.hs +++ b/cabal-testsuite/PackageTests/InternalLibraries/Library/setup.test.hs @@ -1,7 +1,10 @@ import Test.Cabal.Prelude -- Internal library used by public library; it must be installed and -- registered. -main = setupAndCabalTest $ +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "foolib" $ setup_install [] withDirectory "fooexe" $ do diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.test.hs b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.test.hs index 4ebc3a3f5c6..1914571339f 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.test.hs +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-pkg-config.test.hs @@ -5,6 +5,9 @@ import System.Directory import Data.List -- Test to see if --gen-pkg-config works. main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do withPackageDb $ do withDirectory "p" $ do setup_build [] diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.test.hs b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.test.hs index 644d437b8ab..ccb1541fba9 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.test.hs +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.test.hs @@ -1,13 +1,15 @@ import Test.Cabal.Prelude -- Test to see if --gen-script main = setupAndCabalTest $ do - is_windows <- isWindows + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do withPackageDb $ do withDirectory "p" $ do setup_build [] setup "copy" [] setup "register" ["--gen-script"] - _ <- if is_windows + _ <- if isWin then shell "cmd" ["/C", "register.bat"] else shell "sh" ["register.sh"] return () diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup-per-component.test.hs b/cabal-testsuite/PackageTests/InternalLibraries/setup-per-component.test.hs index 7df67266894..5bcaa9610ce 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup-per-component.test.hs +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup-per-component.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- No cabal test because per-component is broken for it main = setupTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "p" $ do setup_install ["q"] diff --git a/cabal-testsuite/PackageTests/InternalLibraries/setup.test.hs b/cabal-testsuite/PackageTests/InternalLibraries/setup.test.hs index 83341ad85f8..90f6a03c5ef 100644 --- a/cabal-testsuite/PackageTests/InternalLibraries/setup.test.hs +++ b/cabal-testsuite/PackageTests/InternalLibraries/setup.test.hs @@ -3,6 +3,9 @@ import Test.Cabal.Prelude -- sure that the internal library correctly is used, not the -- external library. main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "q" $ setup_install [] withDirectory "p" $ do diff --git a/cabal-testsuite/PackageTests/Macros/setup.test.hs b/cabal-testsuite/PackageTests/Macros/setup.test.hs index 6cf5650337d..867d2c02d12 100644 --- a/cabal-testsuite/PackageTests/Macros/setup.test.hs +++ b/cabal-testsuite/PackageTests/Macros/setup.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- Test to ensure that setup_macros.h are computed per-component. main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup_build [] runExe "macros-a" [] runExe "macros-b" [] diff --git a/cabal-testsuite/PackageTests/MultipleLibraries/T6894/setup.test.hs b/cabal-testsuite/PackageTests/MultipleLibraries/T6894/setup.test.hs index 5172e8fd0f9..8977f1b5099 100644 --- a/cabal-testsuite/PackageTests/MultipleLibraries/T6894/setup.test.hs +++ b/cabal-testsuite/PackageTests/MultipleLibraries/T6894/setup.test.hs @@ -1,3 +1,6 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do setup_build [] diff --git a/cabal-testsuite/PackageTests/MultipleLibraries/T7270/cabal.test.hs b/cabal-testsuite/PackageTests/MultipleLibraries/T7270/cabal.test.hs index 1d1df1d33f9..38b633e0bc3 100644 --- a/cabal-testsuite/PackageTests/MultipleLibraries/T7270/cabal.test.hs +++ b/cabal-testsuite/PackageTests/MultipleLibraries/T7270/cabal.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude -main = setupAndCabalTest $ - withPackageDb $ do - withDirectory "dep" $ setup_install [] - withDirectory "p" $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + withPackageDb $ do + withDirectory "dep" $ setup_install [] + withDirectory "p" $ setup_build [] diff --git a/cabal-testsuite/PackageTests/OrderFlags/setup.test.hs b/cabal-testsuite/PackageTests/OrderFlags/setup.test.hs index 0feccd5a426..e47b649953a 100644 --- a/cabal-testsuite/PackageTests/OrderFlags/setup.test.hs +++ b/cabal-testsuite/PackageTests/OrderFlags/setup.test.hs @@ -1,4 +1,8 @@ import Test.Cabal.Prelude -- Test that setup properly orders GHC flags passed to GHC (when -- there are multiple ghc-options fields.) -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-base.test.hs b/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-base.test.hs index 1618a08334a..cf45b06b2af 100644 --- a/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-base.test.hs +++ b/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-base.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude main = cabalTest $ do - withPackageDb $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + withPackageDb $ do withDirectory "p" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-p.test.hs b/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-p.test.hs index 1ddcac2f8bb..956887778d2 100644 --- a/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-p.test.hs +++ b/cabal-testsuite/PackageTests/PackageDB/cabal-fail-no-p.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = cabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "p" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/PackageDB/cabal-manual-packagedb.test.hs b/cabal-testsuite/PackageTests/PackageDB/cabal-manual-packagedb.test.hs index 5b5b061d90e..11edbb39115 100644 --- a/cabal-testsuite/PackageTests/PackageDB/cabal-manual-packagedb.test.hs +++ b/cabal-testsuite/PackageTests/PackageDB/cabal-manual-packagedb.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = cabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "p" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/PackageDB/cabal-packagedb.test.hs b/cabal-testsuite/PackageTests/PackageDB/cabal-packagedb.test.hs index 64a74facaac..45a2a56aec5 100644 --- a/cabal-testsuite/PackageTests/PackageDB/cabal-packagedb.test.hs +++ b/cabal-testsuite/PackageTests/PackageDB/cabal-packagedb.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = cabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ withPackageDb $ do withDirectory "p" $ setup_install [] diff --git a/cabal-testsuite/PackageTests/PackageInfoModule/Library/setup.test.hs b/cabal-testsuite/PackageTests/PackageInfoModule/Library/setup.test.hs index 7c55afb42ca..330e17dab42 100644 --- a/cabal-testsuite/PackageTests/PackageInfoModule/Library/setup.test.hs +++ b/cabal-testsuite/PackageTests/PackageInfoModule/Library/setup.test.hs @@ -1,3 +1,7 @@ import Test.Cabal.Prelude -- Test that Paths module is generated and available for libraries. -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/PathsModule/Library/setup.test.hs b/cabal-testsuite/PackageTests/PathsModule/Library/setup.test.hs index 7c55afb42ca..330e17dab42 100644 --- a/cabal-testsuite/PackageTests/PathsModule/Library/setup.test.hs +++ b/cabal-testsuite/PackageTests/PathsModule/Library/setup.test.hs @@ -1,3 +1,7 @@ import Test.Cabal.Prelude -- Test that Paths module is generated and available for libraries. -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/setup.test.hs b/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/setup.test.hs index 7c55afb42ca..330e17dab42 100644 --- a/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/setup.test.hs +++ b/cabal-testsuite/PackageTests/PathsModule/MissingSafeHaskellMode/setup.test.hs @@ -1,3 +1,7 @@ import Test.Cabal.Prelude -- Test that Paths module is generated and available for libraries. -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build [] diff --git a/cabal-testsuite/PackageTests/PreProcess/Basic/setup.test.hs b/cabal-testsuite/PackageTests/PreProcess/Basic/setup.test.hs index 20f5a9e13a4..bd51374f5fd 100644 --- a/cabal-testsuite/PackageTests/PreProcess/Basic/setup.test.hs +++ b/cabal-testsuite/PackageTests/PreProcess/Basic/setup.test.hs @@ -1,3 +1,7 @@ import Test.Cabal.Prelude -- Check that preprocessors (hsc2hs) are run -main = setupAndCabalTest $ setup_build ["--enable-tests", "--enable-benchmarks"] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build ["--enable-tests", "--enable-benchmarks"] diff --git a/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.test.hs b/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.test.hs index af0769f9681..f70defe6928 100644 --- a/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.test.hs +++ b/cabal-testsuite/PackageTests/PreProcessExtraSources/setup.test.hs @@ -1,3 +1,7 @@ import Test.Cabal.Prelude -- Check that preprocessors that generate extra C sources are handled -main = setupAndCabalTest $ setup_build ["--enable-tests", "--enable-benchmarks"] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + setup_build ["--enable-tests", "--enable-benchmarks"] diff --git a/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.test.hs b/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.test.hs index a3b24ad95ed..ff42add8509 100644 --- a/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.test.hs +++ b/cabal-testsuite/PackageTests/QuasiQuotes/profiling/setup.test.hs @@ -2,6 +2,9 @@ import Test.Cabal.Prelude -- Test building a profiled library/executable which uses QuasiQuotes -- (setup has to build the non-profiled version first) main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnless "no profiling libs" =<< hasProfiledLibraries setup_build ["--enable-library-profiling", "--enable-profiling"] diff --git a/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.test.hs b/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.test.hs index df61a665bca..5684f5d385e 100644 --- a/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.test.hs +++ b/cabal-testsuite/PackageTests/QuasiQuotes/vanilla/setup.test.hs @@ -1,3 +1,6 @@ import Test.Cabal.Prelude -- Test building a vanilla library/executable which uses QuasiQuotes -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ setup_build [] diff --git a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.test.hs b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.test.hs index 232ca3b1395..f2b7899f664 100644 --- a/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.test.hs +++ b/cabal-testsuite/PackageTests/ReexportedModules/setup-fail-ambiguous.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 7.9" withPackageDb $ do withDirectory "containers-dupe" $ diff --git a/cabal-testsuite/PackageTests/ReexportedModules/setup.test.hs b/cabal-testsuite/PackageTests/ReexportedModules/setup.test.hs index c3ae77e43f6..88f21a4933a 100644 --- a/cabal-testsuite/PackageTests/ReexportedModules/setup.test.hs +++ b/cabal-testsuite/PackageTests/ReexportedModules/setup.test.hs @@ -1,6 +1,9 @@ import Test.Cabal.Prelude -- Test that reexported modules build correctly main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 7.9" withPackageDb $ do withDirectory "p" $ setup_install ["--cabal-file", "p.cabal"] diff --git a/cabal-testsuite/PackageTests/Regression/T4449/setup.test.hs b/cabal-testsuite/PackageTests/Regression/T4449/setup.test.hs index 835ade35fb6..69eb04ac0ec 100644 --- a/cabal-testsuite/PackageTests/Regression/T4449/setup.test.hs +++ b/cabal-testsuite/PackageTests/Regression/T4449/setup.test.hs @@ -1,5 +1,8 @@ import Test.Cabal.Prelude main = cabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnlessGhcVersion ">= 7.10" setup "configure" [] setup "build" [] diff --git a/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs b/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs index f88f6249197..201769e8998 100644 --- a/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs +++ b/cabal-testsuite/PackageTests/SPDX/cabal-old-build.test.hs @@ -1,7 +1,11 @@ import Test.Cabal.Prelude -main = setupAndCabalTest $ withPackageDb $ do - setup_install [] - recordMode DoNotRecord $ do - ghc84 <- isGhcVersion ">= 8.4" - let lic = if ghc84 then "BSD-3-Clause" else "BSD3" - ghcPkg' "field" ["my", "license"] >>= assertOutputContains lic +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + withPackageDb $ do + setup_install [] + recordMode DoNotRecord $ do + ghc84 <- isGhcVersion ">= 8.4" + let lic = if ghc84 then "BSD-3-Clause" else "BSD3" + ghcPkg' "field" ["my", "license"] >>= assertOutputContains lic diff --git a/cabal-testsuite/PackageTests/ShowBuildInfo/Custom/custom.test.hs b/cabal-testsuite/PackageTests/ShowBuildInfo/Custom/custom.test.hs index f8c413c7c5b..b8ad0fe0e62 100644 --- a/cabal-testsuite/PackageTests/ShowBuildInfo/Custom/custom.test.hs +++ b/cabal-testsuite/PackageTests/ShowBuildInfo/Custom/custom.test.hs @@ -6,23 +6,25 @@ import Control.Monad.Trans.Reader main = setupTest $ do -- No cabal test because per-component is broken with it skipUnlessGhcVersion ">= 8.1" - withPackageDb $ do - setup_build ["--enable-build-info"] - env <- ask - let buildInfoFp = testDistDir env "build-info.json" - buildInfo <- decodeBuildInfoFile buildInfoFp - assertCommonBuildInfo buildInfo - let [libBI, exeBI] = components buildInfo + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ + withPackageDb $ do + setup_build ["--enable-build-info"] + env <- ask + let buildInfoFp = testDistDir env "build-info.json" + buildInfo <- decodeBuildInfoFile buildInfoFp + assertCommonBuildInfo buildInfo + let [libBI, exeBI] = components buildInfo - assertComponentPure libBI defCompAssertion - { modules = ["MyLib"] - , compType = "lib" - , sourceDirs = ["src"] - } - - assertComponentPure exeBI defCompAssertion - { sourceFiles = ["Main.hs"] - , compType = "exe" - , sourceDirs = ["app"] - } + assertComponentPure libBI defCompAssertion + { modules = ["MyLib"] + , compType = "lib" + , sourceDirs = ["src"] + } + assertComponentPure exeBI defCompAssertion + { sourceFiles = ["Main.hs"] + , compType = "exe" + , sourceDirs = ["app"] + } diff --git a/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.test.hs b/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.test.hs index 0e508579958..64a5e4fca7e 100644 --- a/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.test.hs +++ b/cabal-testsuite/PackageTests/TemplateHaskell/profiling/setup.test.hs @@ -2,6 +2,9 @@ import Test.Cabal.Prelude -- Test building a profiled library/executable which uses Template Haskell -- (setup has to build the non-profiled version first) main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do skipUnless "no profiling libs" =<< hasProfiledLibraries setup_build ["--enable-library-profiling", "--enable-profiling"] diff --git a/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.test.hs b/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.test.hs index d70262ea69c..1aca2d5e810 100644 --- a/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.test.hs +++ b/cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.test.hs @@ -1,3 +1,6 @@ import Test.Cabal.Prelude -- Test building a vanilla library/executable which uses Template Haskell -main = setupAndCabalTest $ setup_build [] +main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ setup_build [] diff --git a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.test.hs b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.test.hs index 99140253d55..27b5d6a5217 100644 --- a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.test.hs +++ b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-markup.test.hs @@ -4,6 +4,9 @@ import Distribution.Simple.Hpc -- Ensures that even if a .tix file happens to be left around -- markup isn't generated. main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do dist_dir <- fmap testDistDir getTestEnv let tixFile = tixFilePath dist_dir Vanilla "test-Short" withEnv [("HPCTIXFILE", Just tixFile)] $ do diff --git a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.test.hs b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.test.hs index 073af976d56..b25cbde2ca5 100644 --- a/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.test.hs +++ b/cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/setup-no-tix.test.hs @@ -12,6 +12,9 @@ import Distribution.Simple.Hpc -- at all.) -- main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ -- Source copy is necessary as GHC defaults to dumping tix -- file in the CWD, and we do NOT clean it up after the fact. withSourceCopy $ do diff --git a/cabal-testsuite/PackageTests/UniqueIPID/setup.test.hs b/cabal-testsuite/PackageTests/UniqueIPID/setup.test.hs index d084e8c1989..9f3fffb55fd 100644 --- a/cabal-testsuite/PackageTests/UniqueIPID/setup.test.hs +++ b/cabal-testsuite/PackageTests/UniqueIPID/setup.test.hs @@ -2,15 +2,18 @@ import Test.Cabal.Prelude import Data.List -- Test that setup computes different IPIDs when dependencies change main = setupAndCabalTest $ do + isWin <- isWindows + ghc94 <- isGhcVersion "== 9.4.*" + expectBrokenIf (isWin && ghc94) 9414 $ do withPackageDb $ do withDirectory "P1" $ setup "configure" ["--disable-deterministic"] withDirectory "P2" $ setup "configure" ["--disable-deterministic"] withDirectory "P1" $ setup "build" [] withDirectory "P1" $ setup "build" [] -- rebuild should work recordMode DoNotRecord $ do - r1 <- withDirectory "P1" $ setup' "register" ["--print-ipid", "--inplace"] - withDirectory "P2" $ setup "build" [] - r2 <- withDirectory "P2" $ setup' "register" ["--print-ipid", "--inplace"] - let exIPID s = takeWhile (/= '\n') $ - head . filter (isPrefixOf $ "UniqueIPID-0.1-") $ (tails s) - assertNotEqual "ipid match" (exIPID $ resultOutput r1) (exIPID $ resultOutput r2) + r1 <- withDirectory "P1" $ setup' "register" ["--print-ipid", "--inplace"] + withDirectory "P2" $ setup "build" [] + r2 <- withDirectory "P2" $ setup' "register" ["--print-ipid", "--inplace"] + let exIPID s = takeWhile (/= '\n') $ + head . filter (isPrefixOf $ "UniqueIPID-0.1-") $ (tails s) + assertNotEqual "ipid match" (exIPID $ resultOutput r1) (exIPID $ resultOutput r2)