diff options
author | 2023-09-22 03:58:59 +0000 | |
---|---|---|
committer | 2023-09-22 22:05:54 +0000 | |
commit | 41326c1f410bafb909a56f1cf7ca8748ce06cab3 (patch) | |
tree | 0d630e655cf5311ccc525173d4d56fc75c8cee42 /rust/fuzz_test.go | |
parent | df0ed707a5bdbe0e3d20afe9f81acb09e2e887be (diff) |
Revert "support sandboxed rust rules"
Revert submission 2629131-sandbox-rust-inputs
Reason for revert: Fail on android build.
Reverted changes: /q/submissionid:2629131-sandbox-rust-inputs
Change-Id: Ifd9aa46e80a12d8f4ffa0a2daa74b96727cbb7e6
Diffstat (limited to 'rust/fuzz_test.go')
-rw-r--r-- | rust/fuzz_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rust/fuzz_test.go b/rust/fuzz_test.go index ea3590556..ee28c6d3a 100644 --- a/rust/fuzz_test.go +++ b/rust/fuzz_test.go @@ -51,23 +51,23 @@ func TestRustFuzz(t *testing.T) { // Check that compiler flags are set appropriately . fuzz_libtest := ctx.ModuleForTests("fuzz_libtest", "android_arm64_armv8-a_fuzzer").Rule("rustc") - if !strings.Contains(fuzz_libtest.RuleParams.Command, "-C passes='sancov-module'") || - !strings.Contains(fuzz_libtest.RuleParams.Command, "--cfg fuzzing") { + if !strings.Contains(fuzz_libtest.Args["rustcFlags"], "-C passes='sancov-module'") || + !strings.Contains(fuzz_libtest.Args["rustcFlags"], "--cfg fuzzing") { t.Errorf("rust_fuzz module does not contain the expected flags (sancov-module, cfg fuzzing).") } // Check that host modules support fuzzing. host_fuzzer := ctx.ModuleForTests("fuzz_libtest", "android_arm64_armv8-a_fuzzer").Rule("rustc") - if !strings.Contains(host_fuzzer.RuleParams.Command, "-C passes='sancov-module'") || - !strings.Contains(host_fuzzer.RuleParams.Command, "--cfg fuzzing") { + if !strings.Contains(host_fuzzer.Args["rustcFlags"], "-C passes='sancov-module'") || + !strings.Contains(host_fuzzer.Args["rustcFlags"], "--cfg fuzzing") { t.Errorf("rust_fuzz_host module does not contain the expected flags (sancov-module, cfg fuzzing).") } // Check that dependencies have 'fuzzer' variants produced for them as well. - libtest_fuzzer := ctx.ModuleForTests("libtest_fuzzing", "android_arm64_armv8-a_rlib_rlib-std_fuzzer").Rule("rustc") - if !strings.Contains(libtest_fuzzer.RuleParams.Command, "-C passes='sancov-module'") || - !strings.Contains(libtest_fuzzer.RuleParams.Command, "--cfg fuzzing") { - t.Errorf("rust_fuzz dependent library does not contain the expected flags (sancov-module, cfg fuzzing). command: %q", libtest_fuzzer.RuleParams.Command) + libtest_fuzzer := ctx.ModuleForTests("libtest_fuzzing", "android_arm64_armv8-a_rlib_rlib-std_fuzzer").Output("libtest_fuzzing.rlib") + if !strings.Contains(libtest_fuzzer.Args["rustcFlags"], "-C passes='sancov-module'") || + !strings.Contains(libtest_fuzzer.Args["rustcFlags"], "--cfg fuzzing") { + t.Errorf("rust_fuzz dependent library does not contain the expected flags (sancov-module, cfg fuzzing).") } } |