Skip to content

Commit 0d1a3d2

Browse files
committed
Disable test that require --install-ghc on Alpine Linux
Alpine Linux does yet support installing GHC.
1 parent dcff4c7 commit 0d1a3d2

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

test/integration/lib/StackTest.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ exeExt = if isWindows then ".exe" else ""
173173
-- | Is the OS Windows?
174174
isWindows = os == "mingw32"
175175

176+
-- | Is the OS Alpine Linux?
177+
getIsAlpine = doesFileExist "/etc/alpine-release"
178+
176179
-- | To avoid problems with GHC version mismatch when a new LTS major
177180
-- version is released, pass this argument to @stack@ when running in
178181
-- a global context. The LTS major version here should match that of

test/integration/tests/1336-1337-new-package-names/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import System.FilePath
66
main :: IO ()
77
main =
88
if isWindows
9-
-- Disabled on Windows (see https://github.com/commercialhaskell/stack/issues/1337#issuecomment-166118678)
10-
then return ()
9+
then logInfo "Disabled on Windows (see https://github.com/commercialhaskell/stack/issues/1337#issuecomment-166118678)"
1110
else do
1211
stack ["new", "1234a-4b-b4-abc-12b34"]
1312
doesExist "./1234a-4b-b4-abc-12b34/stack.yaml"

test/integration/tests/1337-unicode-everywhere/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import StackTest
44
main :: IO ()
55
main =
66
if isWindows
7-
-- Disabled on Windows (see https://github.com/commercialhaskell/stack/issues/1337#issuecomment-166118678)
8-
then return ()
7+
then logInfo "Disabled on Windows (see https://github.com/commercialhaskell/stack/issues/1337#issuecomment-166118678)"
98
else do
109
stack ["build"]
1110
stack ["exec", "以-exe"]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import StackTest
22

33
main :: IO ()
4-
main = stack ["--install-ghc", "runghc", "--package", "safe", "Test.hs"]
4+
main = do
5+
isAlpine <- getIsAlpine
6+
if isAlpine
7+
then logInfo "Disabled on Alpine Linux since it cannot yet install its own GHC."
8+
else stack ["--install-ghc", "runghc", "--package", "safe", "Test.hs"]

test/integration/tests/cabal-solver/Main.hs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ import System.Directory
33

44
main :: IO ()
55
main = do
6-
run "cabal" ["sandbox", "init"]
7-
stack ["unpack", "acme-dont-1.1"]
8-
run "cabal" ["install", "./acme-dont-1.1"]
9-
removeDirectoryRecursive "acme-dont-1.1"
10-
stack ["--install-ghc", "init", "--solver"]
11-
stack ["build"]
6+
isAlpine <- getIsAlpine
7+
if isAlpine
8+
then logInfo "Disabled on Alpine Linux since it cannot yet install its own GHC."
9+
else do
10+
run "cabal" ["sandbox", "init"]
11+
stack ["unpack", "acme-dont-1.1"]
12+
run "cabal" ["install", "./acme-dont-1.1"]
13+
removeDirectoryRecursive "acme-dont-1.1"
14+
stack ["--install-ghc", "init", "--solver"]
15+
stack ["build"]

0 commit comments

Comments
 (0)