Skip to content
Draft
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
18 changes: 17 additions & 1 deletion rules_haskell_tests/tests/asterius/asterius_tests_utils.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
load(
"@rules_haskell//haskell/asterius:defs.bzl",
"ahc_dist",
Expand All @@ -6,7 +7,12 @@ load(
"asterius_webpack",
)

tags = ["dont_test_on_windows", "dont_test_on_darwin", "skip_profiling", "dont_test_on_bazel_lt_4"]
tags = ["dont_test_on_windows", "skip_profiling", "dont_test_on_bazel_lt_4"]

target_compatible_with = selects.with_or({
("@platforms//os:macos"): ["@platforms//:incompatible"],
"//conditions:default": [],
})

def asterius_test_macro(
dep_label,
Expand All @@ -22,6 +28,8 @@ def asterius_test_macro(
entry_point = entry_point,
testonly = True,
tags = tags,
target_compatible_with = target_compatible_with,
exec_compatible_with = target_compatible_with,
)

asterius_test(
Expand All @@ -30,6 +38,8 @@ def asterius_test_macro(
entry_point = entry_point,
testonly = True,
tags = tags,
target_compatible_with = target_compatible_with,
exec_compatible_with = target_compatible_with,
)

asterius_binary(
Expand All @@ -38,6 +48,8 @@ def asterius_test_macro(
entry_point = entry_point,
testonly = True,
tags = tags,
target_compatible_with = target_compatible_with,
exec_compatible_with = target_compatible_with,
)

# TODO the following `asterius_binary_from_genrule` rule is meant to test
Expand All @@ -51,6 +63,8 @@ def asterius_test_macro(
tools = [":asterius_binary" + suffix],
testonly = True,
tags = tags + ["manual"],
target_compatible_with = target_compatible_with,
exec_compatible_with = target_compatible_with,
)

asterius_webpack(
Expand All @@ -59,4 +73,6 @@ def asterius_test_macro(
entry_point = entry_point,
testonly = True,
tags = tags,
target_compatible_with = target_compatible_with,
exec_compatible_with = target_compatible_with,
)