diff options
| author | 2024-01-30 00:47:11 +0000 | |
|---|---|---|
| committer | 2024-01-30 00:47:11 +0000 | |
| commit | d1960fc57c42f60e92a50faa17766b576f214077 (patch) | |
| tree | eb3f9cc9fc945ff0b2aadc1e66a7f35bcdbfcfa2 /java/java_test.go | |
| parent | 06cd0f70a718a15bec871057e97ff652cef96355 (diff) | |
| parent | 5bde2e2ca9997982e8f787dfaeb23e56bbe01915 (diff) | |
Support test runnner option in auto generated test configs am: 5bde2e2ca9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/26053802
Change-Id: If45f3a54fccac34c3f3244e75ee9c19f1452d1dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index 2a4913ecd..0c002f385 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -2275,3 +2275,27 @@ java_test_host { t.Errorf("Expected args[\"extraConfigs\"] to equal %q, was %q", expected, args["extraConfigs"]) } } + +func TestTestRunnerOptions(t *testing.T) { + result := PrepareForTestWithJavaBuildComponents.RunTestWithBp(t, ` +java_test_host { + name: "foo", + test_options: { + test_runner_options: [ + { + name: "test-timeout", + value: "10m" + } + ] + } +} +`) + + buildOS := result.Config.BuildOS.String() + args := result.ModuleForTests("foo", buildOS+"_common"). + Output("out/soong/.intermediates/foo/" + buildOS + "_common/foo.config").Args + expected := proptools.NinjaAndShellEscape("<option name=\"test-timeout\" value=\"10m\" />\\n ") + if args["extraTestRunnerConfigs"] != expected { + t.Errorf("Expected args[\"extraTestRunnerConfigs\"] to equal %q, was %q", expected, args["extraTestRunnerConfigs"]) + } +} |