diff options
author | 2025-01-29 11:42:37 -0800 | |
---|---|---|
committer | 2025-01-29 11:42:37 -0800 | |
commit | 554f36529eee87f6acf401eaaef996667f3c6352 (patch) | |
tree | c9bba67437438af37bea0ea2185e76f3d98820da /python | |
parent | ef3ccc07568523a7aa904a0741f61e3a9621bb04 (diff) | |
parent | 3e178e4e994374992dad96eaf43ab688e536bdfd (diff) |
Merge "Install python tests to testcases/ in soong-only" into main
Diffstat (limited to 'python')
-rw-r--r-- | python/test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/python/test.go b/python/test.go index 0f21771e4..5e70fc185 100644 --- a/python/test.go +++ b/python/test.go @@ -215,6 +215,22 @@ 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) + } + } + // 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...) + } + moduleInfoJSON := ctx.ModuleInfoJSON() moduleInfoJSON.Class = []string{"NATIVE_TESTS"} if len(p.binaryProperties.Test_suites) > 0 { |