Move test data installation to Soong
To generate module-info.json in Soong for b/309006256 Soong needs to know the test data paths. Moving test data installation into Soong will also help later for test suite packaging. Add ModuleContext.InstallTestData that installs the files listed in a []DataPath alongside the test. The files will also be passed to Make to allow it to continue packaging them into the test suites for now. Update the module types that are producing LOCAL_TEST_DATA entries in their Android.mk files to go through InstallTestData instead. Bug: 311428265 Test: atest --host toybox-gtests --test-timeout=120000 Change-Id: Ia8b964f86e584ea464667fd86a48d754d118bead
This commit is contained in:
@@ -1115,6 +1115,7 @@ type ModuleBase struct {
|
||||
// to Make to convert to ninja rules so that Make can add additional dependencies.
|
||||
katiInstalls katiInstalls
|
||||
katiSymlinks katiInstalls
|
||||
testData []DataPath
|
||||
|
||||
// The files to copy to the dist as explicitly specified in the .bp file.
|
||||
distFiles TaggedDistFiles
|
||||
@@ -2065,6 +2066,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
|
||||
m.packagingSpecs = append(m.packagingSpecs, ctx.packagingSpecs...)
|
||||
m.katiInstalls = append(m.katiInstalls, ctx.katiInstalls...)
|
||||
m.katiSymlinks = append(m.katiSymlinks, ctx.katiSymlinks...)
|
||||
m.testData = append(m.testData, ctx.testData...)
|
||||
} else if ctx.Config().AllowMissingDependencies() {
|
||||
// If the module is not enabled it will not create any build rules, nothing will call
|
||||
// ctx.GetMissingDependencies(), and blueprint will consider the missing dependencies to be unhandled
|
||||
|
Reference in New Issue
Block a user