diff options
author | 2025-01-29 10:35:17 -0800 | |
---|---|---|
committer | 2025-01-29 10:35:17 -0800 | |
commit | 3e178e4e994374992dad96eaf43ab688e536bdfd (patch) | |
tree | 2ebda219d82f7c4ed5722b8e8d89ae4757800a2a | |
parent | 5edca14ee0c0b5b6a0e1bb278e09c27993aa41d9 (diff) |
Install python tests to testcases/ in soong-only
Needed for atest to work on python tests.
Bug: 391924360
Test: atest vts_vndk_dependency_test
Change-Id: Iabc05a58e4bbe958365a1027bcec25aa058ed1c9
-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 { |