diff options
author | Dan Shi <dshi@google.com> | 2020-08-15 12:24:26 -0700 |
---|---|---|
committer | Dan Shi <dshi@google.com> | 2020-08-19 15:27:03 -0700 |
commit | 95d19422a679f9947b8989c2245977a29c75b9fa (patch) | |
tree | 5d9413ac8075e5594019b318709f3512f3bc4c84 /java/java.go | |
parent | 6b6f9dbb7d382850ae6966d3ab8c9550b34c7155 (diff) |
Add extra_test_configs option
Bug: 163344047
Test: m -j HelloWorldHostTest hello_world_test HelloWorldTests
Change-Id: I237e3aa3f40df1f6387ba8ff6a16e56535cdeae9
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index d5375a5b3..bd0c2426a 100644 --- a/java/java.go +++ b/java/java.go @@ -2139,6 +2139,12 @@ func LibraryHostFactory() android.Module { // Java Tests // +// Test option struct. +type TestOptions struct { + // a list of extra test configuration files that should be installed with the module. + Extra_test_configs []string `android:"path,arch_variant"` +} + type testProperties struct { // list of compatibility suites (for example "cts", "vts") that the module should be // installed into. @@ -2164,6 +2170,9 @@ type testProperties struct { // Add parameterized mainline modules to auto generated test config. The options will be // handled by TradeFed to do downloading and installing the specified modules on the device. Test_mainline_modules []string + + // Test options. + Test_options TestOptions } type hostTestProperties struct { @@ -2192,8 +2201,9 @@ type Test struct { testProperties testProperties - testConfig android.Path - data android.Paths + testConfig android.Path + extraTestConfigs android.Paths + data android.Paths } type TestHost struct { @@ -2232,6 +2242,8 @@ func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.data = android.PathsForModuleSrc(ctx, j.testProperties.Data) + j.extraTestConfigs = android.PathsForModuleSrc(ctx, j.testProperties.Test_options.Extra_test_configs) + ctx.VisitDirectDepsWithTag(dataNativeBinsTag, func(dep android.Module) { j.data = append(j.data, android.OutputFileForModule(ctx, dep, "")) }) |