summaryrefslogtreecommitdiff
path: root/rust/image_test.go
diff options
context:
space:
mode:
author Sam Delmerico <delmerico@google.com> 2023-09-20 18:48:21 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-09-20 18:48:21 +0000
commit52d1cc334b688d648680c4f365f813a269457b93 (patch)
tree2ddafd5fabc9881fe6772680b55385199d2e5ad2 /rust/image_test.go
parentc331812a59f04a3e79bd300f436aeb6473098ebc (diff)
parenta588d153c85485336e0509f475a4eec653be339b (diff)
Merge changes from topics "revert-2746976-revert-2605644-rulebuilder-ninja-vars-OAAWYCDDLT-KMAGKVIXAT", "sandbox-rust-inputs" into main
* changes: support sandboxed rust rules conditionally escape rule builder command Revert^2 "allow Ninja variables in RuleBuilder API" Revert^2 "add crate_root property to rust modules" Revert^2 "add rust_toolchain_rustc_prebuilt module type"
Diffstat (limited to 'rust/image_test.go')
-rw-r--r--rust/image_test.go36
1 files changed, 18 insertions, 18 deletions
diff --git a/rust/image_test.go b/rust/image_test.go
index fb4d9c170..813c5bcdd 100644
--- a/rust/image_test.go
+++ b/rust/image_test.go
@@ -59,36 +59,36 @@ func TestImageVndkCfgFlag(t *testing.T) {
vendor := ctx.ModuleForTests("libfoo", "android_vendor.29_arm64_armv8-a_static").Rule("rustc")
- if !strings.Contains(vendor.Args["rustcFlags"], "--cfg 'android_vndk'") {
- t.Errorf("missing \"--cfg 'android_vndk'\" for libfoo vendor variant, rustcFlags: %#v", vendor.Args["rustcFlags"])
+ if !strings.Contains(vendor.RuleParams.Command, "--cfg 'android_vndk'") {
+ t.Errorf("missing \"--cfg 'android_vndk'\" for libfoo vendor variant, rustcFlags: %#v", vendor.RuleParams.Command)
}
- if !strings.Contains(vendor.Args["rustcFlags"], "--cfg 'android_vendor'") {
- t.Errorf("missing \"--cfg 'android_vendor'\" for libfoo vendor variant, rustcFlags: %#v", vendor.Args["rustcFlags"])
+ if !strings.Contains(vendor.RuleParams.Command, "--cfg 'android_vendor'") {
+ t.Errorf("missing \"--cfg 'android_vendor'\" for libfoo vendor variant, rustcFlags: %#v", vendor.RuleParams.Command)
}
- if strings.Contains(vendor.Args["rustcFlags"], "--cfg 'android_product'") {
- t.Errorf("unexpected \"--cfg 'android_product'\" for libfoo vendor variant, rustcFlags: %#v", vendor.Args["rustcFlags"])
+ if strings.Contains(vendor.RuleParams.Command, "--cfg 'android_product'") {
+ t.Errorf("unexpected \"--cfg 'android_product'\" for libfoo vendor variant, rustcFlags: %#v", vendor.RuleParams.Command)
}
product := ctx.ModuleForTests("libfoo", "android_product.29_arm64_armv8-a_static").Rule("rustc")
- if !strings.Contains(product.Args["rustcFlags"], "--cfg 'android_vndk'") {
- t.Errorf("missing \"--cfg 'android_vndk'\" for libfoo product variant, rustcFlags: %#v", product.Args["rustcFlags"])
+ if !strings.Contains(product.RuleParams.Command, "--cfg 'android_vndk'") {
+ t.Errorf("missing \"--cfg 'android_vndk'\" for libfoo product variant, rustcFlags: %#v", product.RuleParams.Command)
}
- if strings.Contains(product.Args["rustcFlags"], "--cfg 'android_vendor'") {
- t.Errorf("unexpected \"--cfg 'android_vendor'\" for libfoo product variant, rustcFlags: %#v", product.Args["rustcFlags"])
+ if strings.Contains(product.RuleParams.Command, "--cfg 'android_vendor'") {
+ t.Errorf("unexpected \"--cfg 'android_vendor'\" for libfoo product variant, rustcFlags: %#v", product.RuleParams.Command)
}
- if !strings.Contains(product.Args["rustcFlags"], "--cfg 'android_product'") {
- t.Errorf("missing \"--cfg 'android_product'\" for libfoo product variant, rustcFlags: %#v", product.Args["rustcFlags"])
+ if !strings.Contains(product.RuleParams.Command, "--cfg 'android_product'") {
+ t.Errorf("missing \"--cfg 'android_product'\" for libfoo product variant, rustcFlags: %#v", product.RuleParams.Command)
}
system := ctx.ModuleForTests("libfoo", "android_arm64_armv8-a_static").Rule("rustc")
- if strings.Contains(system.Args["rustcFlags"], "--cfg 'android_vndk'") {
- t.Errorf("unexpected \"--cfg 'android_vndk'\" for libfoo system variant, rustcFlags: %#v", system.Args["rustcFlags"])
+ if strings.Contains(system.RuleParams.Command, "--cfg 'android_vndk'") {
+ t.Errorf("unexpected \"--cfg 'android_vndk'\" for libfoo system variant, rustcFlags: %#v", system.RuleParams.Command)
}
- if strings.Contains(system.Args["rustcFlags"], "--cfg 'android_vendor'") {
- t.Errorf("unexpected \"--cfg 'android_vendor'\" for libfoo system variant, rustcFlags: %#v", system.Args["rustcFlags"])
+ if strings.Contains(system.RuleParams.Command, "--cfg 'android_vendor'") {
+ t.Errorf("unexpected \"--cfg 'android_vendor'\" for libfoo system variant, rustcFlags: %#v", system.RuleParams.Command)
}
- if strings.Contains(system.Args["rustcFlags"], "--cfg 'android_product'") {
- t.Errorf("unexpected \"--cfg 'android_product'\" for libfoo system variant, rustcFlags: %#v", product.Args["rustcFlags"])
+ if strings.Contains(system.RuleParams.Command, "--cfg 'android_product'") {
+ t.Errorf("unexpected \"--cfg 'android_product'\" for libfoo system variant, rustcFlags: %#v", product.RuleParams.Command)
}
}