Skip to content

Commit

Permalink
Fix ForeignLibs test for Windows (backport #10212) (#10219)
Browse files Browse the repository at this point in the history
* Fix ForeignLibs test for Windows

(cherry picked from commit be1ae31)

# Conflicts:
#	cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs

* try to build without #10211

* Swap it in the correct direction

---------

Co-authored-by: Javier Sagredo <[email protected]>
Co-authored-by: brandon s allbery kf8nh <[email protected]>
  • Loading branch information
3 people authored Jul 21, 2024
1 parent 57e49de commit 4eb7434
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions cabal-testsuite/PackageTests/ForeignLibs/MyForeignLib.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
EXPORTS
sayHi
myForeignLibExit
myForeignLibInit
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ foreign-library myforeignlib
type: native-shared

if os(windows)
options: standalone
options: standalone
mod-def-file: MyForeignLib.def

other-modules: MyForeignLib.Hello
MyForeignLib.SomeBindings
Expand Down
5 changes: 1 addition & 4 deletions cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ import Test.Cabal.Prelude
main = setupAndCabalTest . recordMode DoNotRecord $ do
-- Foreign libraries don't work with GHC 7.6 and earlier
skipUnlessGhcVersion ">= 7.8"
win <- isWindows
ghc94 <- isGhcVersion ">= 9.4.1"
expectBrokenIf (win && ghc94) 8451 $
withPackageDb $ do
withPackageDb $ do
setup_install []
setup "copy" [] -- regression test #4156
dist_dir <- fmap testDistDir getTestEnv
Expand Down

0 comments on commit 4eb7434

Please sign in to comment.