diff options
| author | 2023-05-26 04:21:44 +0000 | |
|---|---|---|
| committer | 2024-01-23 18:28:35 +0000 | |
| commit | be0dee88122a6c5d09d2cc20448a3083920a7f9b (patch) | |
| tree | 8718f2e2e3d43ed1a697417b654ce04ffeb73eec /java/java_test.go | |
| parent | 9387734632ba3bf381bd57a638ac1216108c59f4 (diff) | |
Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
Merged-In: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
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"]) + } +} |