Skip to content

Commit ce050b0

Browse files
committed
Skip profiling test on macos with GHC 9.6.2
Trying to build this results in a bus error with ghc-iserv.
1 parent 745663e commit ce050b0

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

rules_haskell_tests/tests/RunTests.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import System.Directory (copyFile)
1010
import System.FilePath ((</>))
1111
import System.Info (os)
1212
import System.IO.Temp (withSystemTempDirectory)
13+
import System.Environment (lookupEnv)
1314

1415
import qualified System.Process as Process
1516
import Test.Hspec.Core.Spec (SpecM)
@@ -26,11 +27,15 @@ main = hspec $ do
2627
assertSuccess (bazel ["test", "//..."])
2728

2829
it "bazel test prof" $ do
30+
ghcVersion <- lookupEnv "GHC_VERSION"
31+
2932
-- In .github/workflows/workflow.yaml we specify --test_tag_filters
3033
-- -dont_test_on_darwin. However, specifiying --test_tag_filters
3134
-- -requires_dynamic here alone would override that filter. So,
3235
-- we have to duplicate that filter here.
33-
let tagFilter | os == "darwin" = "-dont_test_on_darwin,-requires_dynamic,-skip_profiling"
36+
let tagFilter | os == "darwin" = "-dont_test_on_darwin,-requires_dynamic,-skip_profiling" ++ (
37+
-- skip tests for specific GHC version, see https://github.com/tweag/rules_haskell/issues/2073
38+
maybe "" (",-dont_build_on_macos_with_ghc_" ++) ghcVersion)
3439
| otherwise = "-requires_dynamic,-skip_profiling"
3540
assertSuccess (bazel ["test", "-c", "dbg", "//...", "--build_tag_filters", tagFilter, "--test_tag_filters", tagFilter])
3641

rules_haskell_tests/tests/haskell_module/dep-narrowing-th/BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ haskell_library(
9494
narrowed_deps = [
9595
":TestLib2",
9696
],
97+
tags = [
98+
# skip building this target on macos with GHC 9.6.2 since it crashes ghc-iserv
99+
# see https://github.com/tweag/rules_haskell/issues/2073
100+
"dont_build_on_macos_with_ghc_9.6.2",
101+
],
97102
deps = [
98103
":NonModulesTestLib",
99104
":TestLib",
@@ -113,6 +118,11 @@ haskell_test(
113118
name = "Test",
114119
modules = [":TestBinModule"],
115120
narrowed_deps = [":lib"],
121+
tags = [
122+
# skip testing this target on macos with GHC 9.6.2 since it crashes ghc-iserv
123+
# see https://github.com/tweag/rules_haskell/issues/2073
124+
"dont_build_on_macos_with_ghc_9.6.2",
125+
],
116126
visibility = ["//visibility:public"],
117127
deps = [
118128
"//tests/hackage:base",

0 commit comments

Comments
 (0)