From e4e5d8941c4ba9d3d2113fffc70f59860ab9f24b Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Sun, 4 Sep 2022 10:40:41 -0400
Subject: [PATCH] mark Windows tests failing with GHC 9.4 as broken

Tracked as #8451.

ForeignLibs test was marked as broken on Mac for GHC 8.0 but we dropped
8.0 support, so that info was removed.
---
 .../PackageTests/CCompilerOverride/setup.test.hs | 16 +++++++++-------
 .../PackageTests/ForeignLibs/setup.test.hs       |  6 +++---
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs b/cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs
index 7c01bcef82..dbc10efa7a 100644
--- a/cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs
+++ b/cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs
@@ -6,14 +6,16 @@ import Test.Cabal.Prelude
 main = setupAndCabalTest $ do
   skipUnlessGhcVersion ">= 8.8"
   isWin <- isWindows
+  ghc94 <- isGhcVersion "== 9.4.*"
   env   <- getTestEnv
   let pwd      = testCurrentDir env
       customCC = pwd ++ "/custom-cc" ++ if isWin then ".bat" else ""
 
-  setup "configure"
-    [ "--ghc-option=-DNOERROR1"
-    , "--ghc-option=-optc=-DNOERROR2"
-    , "--ghc-option=-optP=-DNOERROR3"
-    , "--with-gcc=" ++ customCC
-    ]
-  setup "build" ["-v2"]
+  expectBrokenIf (isWin && ghc94) 8451 $ do
+    setup "configure"
+      [ "--ghc-option=-DNOERROR1"
+      , "--ghc-option=-optc=-DNOERROR2"
+      , "--ghc-option=-optP=-DNOERROR3"
+      , "--with-gcc=" ++ customCC
+      ]
+    setup "build" ["-v2"]
diff --git a/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs b/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
index a7d8ad0a0f..2bd17605b7 100644
--- a/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
+++ b/cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
@@ -26,9 +26,9 @@ import Test.Cabal.Prelude
 main = setupAndCabalTest . recordMode DoNotRecord $ do
   -- Foreign libraries don't work with GHC 7.6 and earlier
   skipUnlessGhcVersion ">= 7.8"
-  osx <- isOSX
-  ghc80 <- isGhcVersion "== 8.0.2"
-  expectBrokenIf (osx && ghc80) 7989 $
+  win <- isWindows
+  ghc94 <- isGhcVersion "== 9.4.*"
+  expectBrokenIf (win && ghc94) 8451 $
     withPackageDb $ do
         setup_install []
         setup "copy" [] -- regression test #4156
-- 
GitLab