Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cabal-testsuite/PackageTests/Backpack/T5634/setup.test.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
main = do
-- TODO: this might be a GHC bug that needs fixing
skipIfAlpine "bug #11041"
setupAndCabalTest $ do
skipUnlessGhcVersion ">= 8.1"
setup "configure" []
setup "build" []
1 change: 1 addition & 0 deletions cabal-testsuite/cabal-testsuite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ library
, network-uri >= 2.6.0.2 && < 2.7
, network-wait ^>= 0.1.2.0 || ^>= 0.2.0.0
, optparse-applicative ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
, os-release ^>= 1.0.2.1
, process ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
, regex-base ^>= 0.94.0.1
, regex-tdfa ^>= 1.2.3.1 || ^>=1.3.1.0
Expand Down
10 changes: 10 additions & 0 deletions cabal-testsuite/src/Test/Cabal/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import Control.Retry (exponentialBackoff, limitRetriesByCumulativeDelay)
import Network.Wait (waitTcpVerbose)
import System.Environment
import qualified System.FilePath.Glob as Glob (globDir1, compile)
import qualified System.OsRelease as OSR
import System.Process
import System.IO
import qualified System.FilePath.Posix as Posix
Expand Down Expand Up @@ -1079,6 +1080,15 @@ isJavaScript = buildArch == JavaScript
skipIfWindows :: String -> IO ()
skipIfWindows why = skipIfIO ("Windows " <> why) isWindows

skipIfAlpine :: String -> IO ()
skipIfAlpine why = do
mres <- OSR.parseOsRelease
let b = case mres of
Just (OSR.OsReleaseResult { OSR.osRelease = OSR.OsRelease { OSR.id = osId } })
| isLinux -> osId == "alpine"
_ -> False
skipIfIO ("Alpine " <> why) b

skipUnlessWindows :: IO ()
skipUnlessWindows = skipIfIO "Only interesting in Windows" (not isWindows)

Expand Down
Loading