diff options
-rw-r--r-- | .github/workflows/run-all-tests.yml | 2 | ||||
-rw-r--r-- | bazel/compat.bzl | 18 | ||||
-rw-r--r-- | examples/BUILD.bazel | 9 |
3 files changed, 24 insertions, 5 deletions
diff --git a/.github/workflows/run-all-tests.yml b/.github/workflows/run-all-tests.yml index c3bf2668..f08d7f42 100644 --- a/.github/workflows/run-all-tests.yml +++ b/.github/workflows/run-all-tests.yml @@ -45,7 +45,7 @@ jobs: run: bazelisk build --config=ci --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }} --disk_cache=${{ matrix.cache }} --java_runtime_version=localjdk_${{ matrix.jdk }} //... - name: Test - run: bazelisk test --config=ci --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }} --disk_cache=${{ matrix.cache }} --java_runtime_version=localjdk_${{ matrix.jdk }} --test_tag_filters="-broken-on-${{ matrix.arch }}" //... + run: bazelisk test --config=ci --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }} --disk_cache=${{ matrix.cache }} --java_runtime_version=localjdk_${{ matrix.jdk }} //... - name: Upload test logs if: always() diff --git a/bazel/compat.bzl b/bazel/compat.bzl new file mode 100644 index 00000000..35e5bada --- /dev/null +++ b/bazel/compat.bzl @@ -0,0 +1,18 @@ +# Copyright 2021 Code Intelligence GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SKIP_ON_MACOS = select({ + "@platforms//os:macos": ["@platforms//:incompatible"], + "//conditions:default": [], +}) diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index d721b81d..568103ee 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,5 +1,6 @@ load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@fmeum_rules_jni//jni:defs.bzl", "java_library_with_native") +load("//bazel:compat.bzl", "SKIP_ON_MACOS") load("//bazel:fuzz_target.bzl", "java_fuzz_target_test") java_fuzz_target_test( @@ -82,9 +83,9 @@ java_fuzz_target_test( srcs = [ "src/main/java/com/example/ExampleStackOverflowFuzzer.java", ], - # Crashes with a segfault before any stack trace printing is reached. - tags = ["broken-on-darwin"], target_class = "com.example.ExampleStackOverflowFuzzer", + # Crashes with a segfault before any stack trace printing is reached. + target_compatible_with = SKIP_ON_MACOS, ) java_fuzz_target_test( @@ -97,9 +98,9 @@ java_fuzz_target_test( "--jvm_args=-Dfoo=foo;-Dbar=bar", "--additional_jvm_args=-Dbaz=baz", ], - # The exit codes of the forked libFuzzer processes are not picked up correctly. - tags = ["broken-on-darwin"], target_class = "com.example.JpegImageParserFuzzer", + # The exit codes of the forked libFuzzer processes are not picked up correctly. + target_compatible_with = SKIP_ON_MACOS, deps = [ "@maven//:org_apache_commons_commons_imaging", ], |