From a588d153c85485336e0509f475a4eec653be339b Mon Sep 17 00:00:00 2001 From: Sam Delmerico Date: Fri, 16 Jun 2023 10:28:04 -0400 Subject: support sandboxed rust rules This commit adds support for compiling rust rules inside the sbox sandbox. To compile a rust module with sandboxing enabled, the entry point to the crate must be specified via the `crate_root` property, and all input sources and compile-time data must be specified via the `srcs` and `compile_data` properties. Bug: 286077158 Change-Id: I8c9dc5cf7578037a583b4be2e2f73cf20ffd4408 --- rust/clippy_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rust/clippy_test.go') diff --git a/rust/clippy_test.go b/rust/clippy_test.go index bd3bfb151..2703a1c6a 100644 --- a/rust/clippy_test.go +++ b/rust/clippy_test.go @@ -63,14 +63,14 @@ func TestClippy(t *testing.T) { ).RunTest(t) r := result.ModuleForTests("libfoo", "android_arm64_armv8-a_dylib").MaybeRule("clippy") - android.AssertStringEquals(t, "libfoo flags", tc.fooFlags, r.Args["clippyFlags"]) + android.AssertStringDoesContain(t, "libfoo flags", r.RuleParams.Command, tc.fooFlags) r = result.ModuleForTests("libbar", "android_arm64_armv8-a_dylib").MaybeRule("clippy") - android.AssertStringEquals(t, "libbar flags", "${config.ClippyDefaultLints}", r.Args["clippyFlags"]) + android.AssertStringDoesContain(t, "libbar flags", r.RuleParams.Command, "${config.ClippyDefaultLints}") r = result.ModuleForTests("libfoobar", "android_arm64_armv8-a_dylib").MaybeRule("clippy") if r.Rule != nil { - t.Errorf("libfoobar is setup to use clippy when explicitly disabled: clippyFlags=%q", r.Args["clippyFlags"]) + t.Errorf("libfoobar is setup to use clippy when explicitly disabled: command=%q", r.RuleParams.Command) } }) } -- cgit v1.2.3-59-g8ed1b