diff options
| author | 2022-12-17 03:40:01 +0000 | |
|---|---|---|
| committer | 2022-12-17 03:40:01 +0000 | |
| commit | 2731ca83777b70b59a7c4ce0265b852d86cfa44e (patch) | |
| tree | d7882af2f471f13130c23ea1b4fc9af10cad4282 /java/java_test.go | |
| parent | ed8b52ca27b464259dcf4ffc693e1149ba0cdaf1 (diff) | |
| parent | 8ec823cba166a41eb0e9e5ff8fe679e691fec678 (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.go | 22 | 
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"]) +	} +} |