Skip to content

Commit c2eb7ba

Browse files
authored
Merge pull request #8022 from robx/skip
Mark failing tests as expected failures, or fix them
2 parents a5241e8 + 8c09118 commit c2eb7ba

File tree

14 files changed

+51
-34
lines changed

14 files changed

+51
-34
lines changed

cabal-install/cabal-install.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ Test-Suite memory-usage-tests
339339
hs-source-dirs: tests
340340
default-language: Haskell2010
341341

342-
ghc-options: -threaded -rtsopts "-with-rtsopts=-M8M -K1K"
342+
ghc-options: -threaded -rtsopts "-with-rtsopts=-M16M -K1K"
343343

344344
other-modules:
345345
UnitTests.Distribution.Solver.Modular.DSL

cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Test.Cabal.Prelude
22
main = setupAndCabalTest $ do
3-
skipUnlessGhcVersion ">= 8.1"
3+
skipUnlessGhcVersion ">= 8.1"
4+
ghc <- isGhcVersion "== 9.0.2 || == 9.2.1"
5+
expectBrokenIf ghc 7987 $ do
46
withPackageDb $ do
57
withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]
68
withDirectory "mysql" $ setup_install_with_docs ["--ipid", "mysql-0.1.0.0"]

cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import Test.Cabal.Prelude
22
main = setupTest $ do
3-
-- No cabal test because per-component is broken with it
4-
skipUnlessGhcVersion ">= 8.1"
3+
-- No cabal test because per-component is broken with it
4+
skipUnlessGhcVersion ">= 8.1"
5+
ghc <- isGhcVersion "== 9.0.2 || == 9.2.1"
6+
expectBrokenIf ghc 7987 $
57
withPackageDb $ do
68
let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args)
79
setup_install' ["mylib", "--cid", "mylib-0.1.0.0"]

cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import Test.Cabal.Prelude
22
import Data.List
33
import qualified Data.Char as Char
44
main = setupAndCabalTest $ do
5-
skipUnlessGhcVersion ">= 8.1"
5+
skipUnlessGhcVersion ">= 8.1"
6+
ghc <- isGhcVersion "== 9.0.2 || == 9.2.1"
7+
expectBrokenIf ghc 7987 $
68
withPackageDb $ do
79
containers_id <- getIPID "containers"
810
withDirectory "repo/sigs-0.1.0.0" $ setup_install_with_docs ["--ipid", "sigs-0.1.0.0"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Test.Cabal.Prelude
22

33
main = setupTest $ do
4-
skipIf "ghc < 7.8" =<< ghcVersionIs (< mkVersion [7,8])
4+
skipIf "ghc < 7.8" =<< isGhcVersion "< 7.8"
55
setup "configure" []
66
res <- setup' "build" []
77
assertOutputContains "= Post common block elimination =" res
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import Test.Cabal.Prelude
22
main = setupTest $ do
33
skipUnless "no Cabal for GHC" =<< hasCabalForGhc
4-
-- On Travis OSX, Cabal shipped with GHC 7.8 does not work
5-
-- with error "setup: /usr/bin/ar: permission denied"; see
6-
-- also https://github.com/haskell/cabal/issues/3938
7-
-- This is a hack to make the test not run in this case.
8-
skipIf "osx and ghc < 7.10" =<< liftM2 (&&) isOSX (ghcVersionIs (< mkVersion [7,10]))
94
setup' "configure" [] >>= assertOutputContains "ThisIsCustomYeah"
105
setup' "build" [] >>= assertOutputContains "ThisIsCustomYeah"

cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ import Test.Cabal.Prelude
2424
-- Recording is turned off because versionedlib will or will not
2525
-- be installed depending on if we're on Linux or not.
2626
main = setupAndCabalTest . recordMode DoNotRecord $ do
27-
-- Foreign libraries don't work with GHC 7.6 and earlier
28-
skipUnlessGhcVersion ">= 7.8"
27+
-- Foreign libraries don't work with GHC 7.6 and earlier
28+
skipUnlessGhcVersion ">= 7.8"
29+
osx <- isOSX
30+
ghc <- isGhcVersion "== 8.0.2"
31+
expectBrokenIf (osx && ghc) 7989 $
2932
withPackageDb $ do
3033
setup_install []
3134
setup "copy" [] -- regression test #4156
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
import Test.Cabal.Prelude
22
main = cabalTest $ do
3+
missesProfiling <- isGhcVersion ">= 9.2.1"
4+
osx <- isOSX
5+
missesProfilingOsx <- isGhcVersion ">= 8.10.7"
6+
expectBrokenIf (missesProfiling || osx && missesProfilingOsx) 8032 $
37
cabal "v2-build" ["exe:q"]

cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import Test.Cabal.Prelude
33
-- an executable RPATH. Don't test on Windows, which doesn't
44
-- support RPATH.
55
main = setupAndCabalTest $ do
6-
skipIfWindows
6+
skipIfWindows
7+
osx <- isOSX
8+
ghc <- isGhcVersion ">= 8.10.7"
9+
expectBrokenIf (osx && ghc) 7610 $ do -- see also issue #7988
710
setup "configure" ["--enable-executable-dynamic"]
811
setup "build" []
912
-- This should fail as it we should NOT be able to find the

cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ main = setupAndCabalTest $ do
66
skipUnless "no shared libs" =<< hasSharedLibraries
77
skipUnless "no shared Cabal" =<< hasCabalShared
88
skipUnless "no Cabal for GHC" =<< hasCabalForGhc
9-
setup_build ["--enable-tests", "--enable-executable-dynamic"]
10-
setup "test" []
9+
ghc <- isGhcVersion "== 8.0.2"
10+
osx <- isOSX
11+
expectBrokenIf (osx && ghc) 8028 $ do
12+
setup_build ["--enable-tests", "--enable-executable-dynamic"]
13+
setup "test" []

0 commit comments

Comments
 (0)