aboutsummaryrefslogtreecommitdiff
path: root/python/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'python/test.go')
-rw-r--r--python/test.go32
1 files changed, 14 insertions, 18 deletions
diff --git a/python/test.go b/python/test.go
index df62ab794..d6670c3c4 100644
--- a/python/test.go
+++ b/python/test.go
@@ -215,25 +215,21 @@ func (p *PythonTestModule) GenerateAndroidBuildActions(ctx android.ModuleContext
installedData := ctx.InstallTestData(installDir, p.data)
p.installedDest = ctx.InstallFile(installDir, p.installSource.Base(), p.installSource, installedData...)
- // TODO: Remove the special case for kati
- if !ctx.Config().KatiEnabled() {
- // Install the test config in testcases/ directory for atest.
- // Install configs in the root of $PRODUCT_OUT/testcases/$module
- testCases := android.PathForModuleInPartitionInstall(ctx, "testcases", ctx.ModuleName())
- if ctx.PrimaryArch() {
- if p.testConfig != nil {
- ctx.InstallFile(testCases, ctx.ModuleName()+".config", p.testConfig)
- }
- dynamicConfig := android.ExistentPathForSource(ctx, ctx.ModuleDir(), "DynamicConfig.xml")
- if dynamicConfig.Valid() {
- ctx.InstallFile(testCases, ctx.ModuleName()+".dynamic", dynamicConfig.Path())
- }
- }
- // Install tests and data in arch specific subdir $PRODUCT_OUT/testcases/$module/$arch
- testCases = testCases.Join(ctx, ctx.Target().Arch.ArchType.String())
- installedData := ctx.InstallTestData(testCases, p.data)
- ctx.InstallFile(testCases, p.installSource.Base(), p.installSource, installedData...)
+ configFileSuffix := ""
+ // ATS 2.0 is the test harness for mobly tests and the test config is for ATS 2.0.
+ // Add "v2" suffix to test config name to distinguish it from the config for TF.
+ if proptools.String(p.testProperties.Test_options.Runner) == "mobly" {
+ configFileSuffix = "v2"
}
+ ctx.SetTestSuiteInfo(android.TestSuiteInfo{
+ TestSuites: p.binaryProperties.Test_suites,
+ MainFile: p.installSource,
+ MainFileStem: p.installSource.Base(),
+ ConfigFile: p.testConfig,
+ ConfigFileSuffix: configFileSuffix,
+ Data: p.data,
+ NeedsArchFolder: true,
+ })
moduleInfoJSON := ctx.ModuleInfoJSON()
moduleInfoJSON.Class = []string{"NATIVE_TESTS"}