Skip to content

Commit 4ff1eb6

Browse files
committed
Skip T5634 on Alpine
See #11041
1 parent d608e60 commit 4ff1eb6

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import Test.Cabal.Prelude
2-
main = setupAndCabalTest $ do
2+
main = do
3+
-- TODO: this might be a GHC bug that needs fixing
4+
skipIfAlpine "bug #11041"
5+
setupAndCabalTest $ do
36
skipUnlessGhcVersion ">= 8.1"
47
setup "configure" []
58
setup "build" []

cabal-testsuite/cabal-testsuite.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ library
7575
, network-uri >= 2.6.0.2 && < 2.7
7676
, network-wait ^>= 0.1.2.0 || ^>= 0.2.0.0
7777
, optparse-applicative ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
78+
, os-release ^>= 1.0.2.1
7879
, process ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
7980
, regex-base ^>= 0.94.0.1
8081
, regex-tdfa ^>= 1.2.3.1 || ^>=1.3.1.0

cabal-testsuite/src/Test/Cabal/Prelude.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import Control.Retry (exponentialBackoff, limitRetriesByCumulativeDelay)
7575
import Network.Wait (waitTcpVerbose)
7676
import System.Environment
7777
import qualified System.FilePath.Glob as Glob (globDir1, compile)
78+
import qualified System.OsRelease as OSR
7879
import System.Process
7980
import System.IO
8081
import qualified System.FilePath.Posix as Posix
@@ -1079,6 +1080,15 @@ isJavaScript = buildArch == JavaScript
10791080
skipIfWindows :: String -> IO ()
10801081
skipIfWindows why = skipIfIO ("Windows " <> why) isWindows
10811082

1083+
skipIfAlpine :: String -> IO ()
1084+
skipIfAlpine why = do
1085+
mres <- OSR.parseOsRelease
1086+
let b = case mres of
1087+
Just (OSR.OsReleaseResult { OSR.osRelease = OSR.OsRelease { OSR.id = osId } })
1088+
| isLinux -> osId == "alpine"
1089+
_ -> False
1090+
skipIfIO ("Alpine " <> why) b
1091+
10821092
skipUnlessWindows :: IO ()
10831093
skipUnlessWindows = skipIfIO "Only interesting in Windows" (not isWindows)
10841094

0 commit comments

Comments
 (0)