Skip to content

Commit dd25f3e

Browse files
committed
Ignore internal-libraries test on macOS/Aarch64
1 parent c9fe943 commit dd25f3e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

test/integration/lib/StackTest.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{-# LANGUAGE ScopedTypeVariables #-}
2+
13
module StackTest
24
( run'
35
, run
@@ -37,6 +39,7 @@ module StackTest
3739
, isLinux
3840
, getIsAlpine
3941
, isARM
42+
, isAarch64
4043
, isMacOSX
4144
, defaultResolverArg
4245
, removeFileIgnore
@@ -334,6 +337,10 @@ getIsAlpine = doesFileExist "/etc/alpine-release"
334337
isARM :: Bool
335338
isARM = arch == "arm"
336339

340+
-- | Is the architecture Aarch64?
341+
isAarch64 :: Bool
342+
isAarch64 = arch == "aarch64"
343+
337344
-- | Is the OS Mac OS X?
338345
isMacOSX :: Bool
339346
isMacOSX = os == "darwin"

test/integration/tests/internal-libraries/Main.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
import Control.Monad ( unless )
12
import StackTest
23

34
main :: IO ()
4-
main = do
5+
-- See https://github.com/haskell/cabal/issues/7763. On macOS (Apple silicon),
6+
-- fails with Cabal error:
7+
-- "Cabal-simple_SvXsv1f__3.2.1.0_ghc-8.10.7: Cannot build some foreign libraries:
8+
-- Building foreign libraries is currently only supported on OSX, Linux and
9+
-- Windows"
10+
main = unless ( isAarch64 && isMacOSX ) $ do
511
-- The '--install-ghc' flag is passed here, because etc/scripts/release.hs
612
-- passes `--no-install-ghc` when `--alpine` is passed to its 'check'
713
-- command.

0 commit comments

Comments
 (0)