Fix Soong code, remove dead code, and clean up code for Java fuzz

(cherry picked from commit fdf043a7b1)

Test: built fuzz targets locally and tested them with Jazzer
Change-Id: I3ff487ba4e34289e0f53f2077463f524f4bf4f11
This commit is contained in:
Cory Barker
2023-02-03 00:20:52 +00:00
committed by LaMont Jones
parent a2244043ea
commit eaf7f5ecb9
4 changed files with 71 additions and 156 deletions

View File

@@ -31,17 +31,15 @@ var prepForJavaFuzzTest = android.GroupFixturePreparers(
func TestJavaFuzz(t *testing.T) {
result := prepForJavaFuzzTest.RunTestWithBp(t, `
java_fuzz_host {
java_fuzz {
name: "foo",
srcs: ["a.java"],
host_supported: true,
device_supported: false,
libs: ["bar"],
static_libs: ["baz"],
jni_libs: [
"libjni",
],
sanitizers: [
"address",
"fuzzer",
],
}
@@ -84,7 +82,7 @@ func TestJavaFuzz(t *testing.T) {
}
ctx := result.TestContext
foo := ctx.ModuleForTests("foo", osCommonTarget).Module().(*JavaFuzzLibrary)
foo := ctx.ModuleForTests("foo", osCommonTarget).Module().(*JavaFuzzTest)
expected := "lib64/libjni.so"
if runtime.GOOS == "darwin" {