Skip to content

Commit

Permalink
Fix main_class error in java_fuzz_test
Browse files Browse the repository at this point in the history
In certain situations, `java_fuzz_test`s failed with

```
ERROR: Projects/fuzz-sample/BUILD:3:15: in java_binary rule //:JavaFuzzTest_metadata_: need at least one of 'main_class' or Java source files
ERROR: Projects/fuzz-sample/BUILD:3:15: in java_binary rule //:JavaFuzzTest_metadata_: main_class was not provided and cannot be inferred: source path doesn't include a known root (java, javatests, src, testsrc)
ERROR: Projects/fuzz-sample/BUILD:3:15: Analysis of target '//:JavaFuzzTest_metadata_' failed
```

This is fixed by marking the metadata jar as non-executable.
  • Loading branch information
fmeum committed Sep 21, 2023
1 parent ec40a7b commit 6010db2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fuzzing/private/fuzz_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def java_fuzz_test(

native.java_binary(
name = metadata_binary_name,
create_executable = False,
deploy_manifest_lines = [target_class_manifest_line],
tags = ["manual"],
)
Expand Down

0 comments on commit 6010db2

Please sign in to comment.