Skip to content

Commit 840ee99

Browse files
authored
Merge pull request #9425 from mpickering/wip/windows-cli
CI: Attempt to enable tests for 9.6.3 windows
2 parents 21b858f + 0a177f3 commit 840ee99

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

.github/workflows/validate.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,13 @@ jobs:
166166
# Have to disable *-suite validation:
167167
# - the [email protected] problem is tracked at https://github.com/haskell/cabal/issues/8858
168168
# - but curently can't run it with GHC 9.6, tracking: https://github.com/haskell/cabal/issues/8883
169-
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.3')
170169
run: sh validate.sh $FLAGS -s lib-suite
171170

172171
- name: Validate cli-tests
173172
run: sh validate.sh $FLAGS -s cli-tests
174173

175174
- name: Validate cli-suite
176175
# Have to disable *-suite validation, see above the comment for lib-suite
177-
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.3')
178176
run: sh validate.sh $FLAGS -s cli-suite
179177

180178
validate-old-ghcs:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo OFF
2+
3+
where /q clang.exe
4+
5+
IF %ERRORLEVEL% EQU 0 (
6+
call clang.exe -DNOERROR6 %*
7+
EXIT /B %ERRORLEVEL%
8+
)
9+
10+
ECHO "Cannot find C compiler"
11+
EXIT /B 1

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ import Test.Cabal.Prelude
66
main = setupAndCabalTest $ do
77
skipUnlessGhcVersion ">= 8.8"
88
isWin <- isWindows
9-
ghc94 <- isGhcVersion "== 9.4.*"
9+
ghc94 <- isGhcVersion ">= 9.4.1"
1010
env <- getTestEnv
1111
let pwd = testCurrentDir env
12-
customCC = pwd ++ "/custom-cc" ++ if isWin then ".bat" else ""
12+
win_suffix = if ghc94 then "-clang.bat" else ".bat"
13+
customCC =
14+
pwd ++ "/custom-cc" ++ if isWin then win_suffix else ""
1315

14-
expectBrokenIf (isWin && ghc94) 8451 $ do
15-
setup "configure"
16-
[ "--ghc-option=-DNOERROR1"
17-
, "--ghc-option=-optc=-DNOERROR2"
18-
, "--ghc-option=-optP=-DNOERROR3"
19-
, "--with-gcc=" ++ customCC
20-
]
21-
setup "build" ["-v2"]
16+
setup "configure"
17+
[ "--ghc-option=-DNOERROR1"
18+
, "--ghc-option=-optc=-DNOERROR2"
19+
, "--ghc-option=-optP=-DNOERROR3"
20+
, "--with-gcc=" ++ customCC
21+
]
22+
setup "build" ["-v2"]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Distribution.Simple.Program.Types
1717
import Distribution.System
1818
import Distribution.Verbosity
1919
import Distribution.Version
20+
import System.Directory
2021

2122
import Test.Cabal.Prelude
2223

@@ -27,7 +28,7 @@ main = setupAndCabalTest . recordMode DoNotRecord $ do
2728
-- Foreign libraries don't work with GHC 7.6 and earlier
2829
skipUnlessGhcVersion ">= 7.8"
2930
win <- isWindows
30-
ghc94 <- isGhcVersion "== 9.4.*"
31+
ghc94 <- isGhcVersion ">= 9.4.1"
3132
expectBrokenIf (win && ghc94) 8451 $
3233
withPackageDb $ do
3334
setup_install []

0 commit comments

Comments
 (0)