From 611f8be6211d9c80ed49551cc2408dd46ef1c88e Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 28 Feb 2022 19:50:44 +0100 Subject: [PATCH] Mark several failing test cases as "expected broken" Failures are tracked in issues https://github.com/haskell/cabal/issues/7610 https://github.com/haskell/cabal/issues/7987 https://github.com/haskell/cabal/issues/7989 https://github.com/haskell/cabal/issues/8028 https://github.com/haskell/cabal/issues/8032 --- .../PackageTests/Backpack/Includes2/setup-external.test.hs | 4 +++- .../Backpack/Includes2/setup-per-component.test.hs | 6 ++++-- .../Backpack/Includes3/setup-external-ok.test.hs | 4 +++- cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs | 7 +++++-- cabal-testsuite/PackageTests/NewBuild/T3827/cabal.test.hs | 3 +++ .../PackageTests/Regression/T4025/setup.test.hs | 5 ++++- .../PackageTests/Regression/T4270/setup.test.hs | 7 +++++-- 7 files changed, 27 insertions(+), 9 deletions(-) diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs index 33f813a5eef..217aa2340d7 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs @@ -1,6 +1,8 @@ import Test.Cabal.Prelude main = setupAndCabalTest $ do - skipUnlessGhcVersion ">= 8.1" + skipUnlessGhcVersion ">= 8.1" + ghc <- isGhcVersion "== 9.0.2 || == 9.2.1" + expectBrokenIf ghc 7987 $ do withPackageDb $ do withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"] withDirectory "mysql" $ setup_install_with_docs ["--ipid", "mysql-0.1.0.0"] diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs index cfb08f33ed1..a3809d70fc0 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs @@ -1,7 +1,9 @@ import Test.Cabal.Prelude main = setupTest $ do - -- No cabal test because per-component is broken with it - skipUnlessGhcVersion ">= 8.1" + -- No cabal test because per-component is broken with it + skipUnlessGhcVersion ">= 8.1" + ghc <- isGhcVersion "== 9.0.2 || == 9.2.1" + expectBrokenIf ghc 7987 $ withPackageDb $ do let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args) setup_install' ["mylib", "--cid", "mylib-0.1.0.0"] diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs index 82cb49643a3..8760bb6b35a 100644 --- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs +++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs @@ -2,7 +2,9 @@ import Test.Cabal.Prelude import Data.List import qualified Data.Char as Char main = setupAndCabalTest $ do - skipUnlessGhcVersion ">= 8.1" + skipUnlessGhcVersion ">= 8.1" + ghc <- isGhcVersion "== 9.0.2 || == 9.2.1" + expectBrokenIf ghc 7987 $ withPackageDb $ do containers_id <- getIPID "containers" withDirectory "repo/sigs-0.1.0.0" $ setup_install_with_docs ["--ipid", "sigs-0.1.0.0"] diff --git a/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs b/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs index 7b7bae851bf..108219f29f2 100644 --- a/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs +++ b/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs @@ -24,8 +24,11 @@ import Test.Cabal.Prelude -- Recording is turned off because versionedlib will or will not -- be installed depending on if we're on Linux or not. main = setupAndCabalTest . recordMode DoNotRecord $ do - -- Foreign libraries don't work with GHC 7.6 and earlier - skipUnlessGhcVersion ">= 7.8" + -- Foreign libraries don't work with GHC 7.6 and earlier + skipUnlessGhcVersion ">= 7.8" + osx <- isOSX + ghc <- isGhcVersion "== 8.0.2" + expectBrokenIf (osx && ghc) 7989 $ withPackageDb $ do setup_install [] setup "copy" [] -- regression test #4156 diff --git a/cabal-testsuite/PackageTests/NewBuild/T3827/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/T3827/cabal.test.hs index a591492b2d9..0a36bc04d57 100644 --- a/cabal-testsuite/PackageTests/NewBuild/T3827/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/T3827/cabal.test.hs @@ -1,3 +1,6 @@ import Test.Cabal.Prelude main = cabalTest $ do + osx <- isOSX + ghc <- isGhcVersion "== 8.10.7" + expectBrokenIf (osx && ghc) 8032 $ cabal "v2-build" ["exe:q"] diff --git a/cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs b/cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs index 9f38351758f..0ec5d068147 100644 --- a/cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs +++ b/cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs @@ -3,7 +3,10 @@ import Test.Cabal.Prelude -- an executable RPATH. Don't test on Windows, which doesn't -- support RPATH. main = setupAndCabalTest $ do - skipIfWindows + skipIfWindows + osx <- isOSX + ghc <- isGhcVersion ">= 8.10.7" + expectBrokenIf (osx && ghc) 7610 $ do -- see also issue #7988 setup "configure" ["--enable-executable-dynamic"] setup "build" [] -- This should fail as it we should NOT be able to find the diff --git a/cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs b/cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs index a62eef8bfd5..cf3d7afbdfb 100644 --- a/cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs +++ b/cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs @@ -6,5 +6,8 @@ main = setupAndCabalTest $ do skipUnless "no shared libs" =<< hasSharedLibraries skipUnless "no shared Cabal" =<< hasCabalShared skipUnless "no Cabal for GHC" =<< hasCabalForGhc - setup_build ["--enable-tests", "--enable-executable-dynamic"] - setup "test" [] + ghc <- isGhcVersion "== 8.0.2" + osx <- isOSX + expectBrokenIf (osx && ghc) 8028 $ do + setup_build ["--enable-tests", "--enable-executable-dynamic"] + setup "test" []