summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/build_defs.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'test/runtimes/build_defs.bzl')
-rw-r--r--test/runtimes/build_defs.bzl17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/runtimes/build_defs.bzl b/test/runtimes/build_defs.bzl
index 7edd12c17..7c11624b4 100644
--- a/test/runtimes/build_defs.bzl
+++ b/test/runtimes/build_defs.bzl
@@ -1,4 +1,6 @@
-"""Defines a rule for runsc test targets."""
+"""Defines a rule for runtime test targets."""
+
+load("@io_bazel_rules_go//go:def.bzl", "go_test")
# runtime_test is a macro that will create targets to run the given test target
# with different runtime options.
@@ -21,6 +23,9 @@ def runtime_test(
args += ["--blacklist_file", "test/runtimes/" + blacklist_file]
data += [blacklist_file]
+ # Add a test that the blacklist parses correctly.
+ blacklist_test(lang, blacklist_file)
+
sh_test(
name = lang + "_test",
srcs = ["runner.sh"],
@@ -35,6 +40,16 @@ def runtime_test(
],
)
+def blacklist_test(lang, blacklist_file):
+ """Test that a blacklist parses correctly."""
+ go_test(
+ name = lang + "_blacklist_test",
+ embed = [":runner"],
+ srcs = ["blacklist_test.go"],
+ args = ["--blacklist_file", "test/runtimes/" + blacklist_file],
+ data = [blacklist_file],
+ )
+
def sh_test(**kwargs):
"""Wraps the standard sh_test."""
native.sh_test(