Reapply "Change test_module_config from copying files to symlink ..."

This reverts commit c6a321e4de.

Original commit broke whe building sdk/ndk in postsubmit because of
missing target arch.

See: https://android-build.corp.google.com/artifact/submitted/11914755/mainline_modules_sdks-trunk_staging-userdebug/latest/view/logs%2Fbuild_error.log

Reapplying originaly commit and adding fix in patchest.

Test: DIST_DIR=/usr/local/google/dist/bug TARGET_RELEASE=trunk_staging TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true packages/modules/common/build/mainline_modules_sdks.sh
Test: m general-tests
Change-Id: Id844feb7ff9750bcd5af890a9fd26f7342344965
This commit is contained in:
Ronald Braunstein
2024-06-02 07:07:02 -07:00
parent d5e16ac52b
commit 01d31bdc98
5 changed files with 175 additions and 65 deletions

View File

@@ -6,7 +6,8 @@ import (
"github.com/google/blueprint"
)
// Output files we need from a base test that we derive from.
// Data that test_module_config[_host] modules types will need from
// their dependencies to write out build rules and AndroidMkEntries.
type BaseTestProviderData struct {
// data files and apps for android_test
InstalledFiles android.Paths
@@ -19,8 +20,14 @@ type BaseTestProviderData struct {
RequiredModuleNames []string
// List of test suites base uses.
TestSuites []string
// Used for bases that are Host
// True indicates the base modules is built for Host.
IsHost bool
// Base's sdk version for AndroidMkEntries, generally only used for Host modules.
LocalSdkVersion string
// Base's certificate for AndroidMkEntries, generally only used for device modules.
LocalCertificate string
// Indicates if the base module was a unit test.
IsUnitTest bool
}
var BaseTestProviderKey = blueprint.NewProvider[BaseTestProviderData]()