summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-12-17 03:40:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-12-17 03:40:01 +0000
commit2731ca83777b70b59a7c4ce0265b852d86cfa44e (patch)
treed7882af2f471f13130c23ea1b4fc9af10cad4282 /java/java_test.go
parented8b52ca27b464259dcf4ffc693e1149ba0cdaf1 (diff)
parent8ec823cba166a41eb0e9e5ff8fe679e691fec678 (diff)
Merge "Allow adding extra tradefed options in the Android.bp file"
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go
index dff1fd07f..62a372cd9 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -1945,3 +1945,25 @@ func TestJavaApiLibraryJarGeneration(t *testing.T) {
}
}
}
+
+func TestTradefedOptions(t *testing.T) {
+ result := PrepareForTestWithJavaBuildComponents.RunTestWithBp(t, `
+java_test_host {
+ name: "foo",
+ test_options: {
+ tradefed_options: [
+ {
+ name: "exclude-path",
+ value: "org/apache"
+ }
+ ]
+ }
+}
+`)
+ args := result.ModuleForTests("foo", "linux_glibc_common").
+ Output("out/soong/.intermediates/foo/linux_glibc_common/foo.config").Args
+ expected := proptools.NinjaAndShellEscape("<option name=\"exclude-path\" value=\"org/apache\" />")
+ if args["extraConfigs"] != expected {
+ t.Errorf("Expected args[\"extraConfigs\"] to equal %q, was %q", expected, args["extraConfigs"])
+ }
+}