diff options
author | 2023-06-02 11:20:23 +0000 | |
---|---|---|
committer | 2023-06-02 11:20:23 +0000 | |
commit | b25cbb3449fe589281f04ba9132986aa9bbe3a44 (patch) | |
tree | 3451f6d7ce5df6e2fe8701f71c055523fa4288bd /java/java_test.go | |
parent | 672c1467d5445a3220746db248a2855883f3ac35 (diff) | |
parent | ec7314336a2b35ea30ce5438b83949c28e3ac429 (diff) |
Merge "Support test runnner option in auto generated test configs"
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 ea89e6eb8..cd5c343ce 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -2298,3 +2298,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"]) + } +} |