aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/BUILD.bazel14
1 files changed, 11 insertions, 3 deletions
diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel
index f694411a..62bb1391 100644
--- a/examples/BUILD.bazel
+++ b/examples/BUILD.bazel
@@ -2,6 +2,14 @@ load("@rules_java//java:defs.bzl", "java_binary")
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library")
load("//bazel:fuzz_target.bzl", "java_fuzz_target_test")
+# List of all platforms except OSX. Set this value to attribute
+# "target_compatible_with" of targets that should not be executed on OSX.
+NOT_OSX = [
+ "@bazel_tools//platforms:freebsd",
+ "@bazel_tools//platforms:linux",
+ "@bazel_tools//platforms:windows",
+]
+
java_fuzz_target_test(
name = "ExampleFuzzer",
srcs = [
@@ -20,7 +28,7 @@ java_fuzz_target_test(
],
native_libs = ["//examples/src/main/native"],
# Bazel creates shared libraries with an incorrect extension on macOS.
- tags = ["broken-on-darwin"],
+ target_compatible_with = NOT_OSX,
target_class = "com.example.ExampleFuzzerWithNative",
use_asan = True,
deps = [
@@ -63,7 +71,7 @@ java_fuzz_target_test(
"src/main/java/com/example/ExampleStackOverflowFuzzer.java",
],
# Crashes with a segfault before any stack trace printing is reached.
- tags = ["broken-on-darwin"],
+ target_compatible_with = NOT_OSX,
target_class = "com.example.ExampleStackOverflowFuzzer",
)
@@ -74,7 +82,7 @@ java_fuzz_target_test(
],
fuzzer_args = ["-fork=5"],
# The exit codes of the forked libFuzzer processes are not picked up correctly.
- tags = ["broken-on-darwin"],
+ target_compatible_with = NOT_OSX,
target_class = "com.example.JpegImageParserFuzzer",
deps = [
"@maven//:org_apache_commons_commons_imaging",