diff options
author | 2024-04-11 15:43:32 -0700 | |
---|---|---|
committer | 2024-05-31 08:24:11 -0700 | |
commit | f216af5653fb8e8f2b9e34065b1ae05a70146f68 (patch) | |
tree | 35d90477ddd5627b27612af74157e85e5d4960d2 /tradefed | |
parent | 4aff4625338ddb86115109cd0cb33c5d6b02d758 (diff) |
Change test_module_config from copying files to symlink files.
Now the derived modules will have symlink's to base's testcase dir
rather than copyfile files from base's intermediates dir.
I also removed storing the "base" module as dependency and only use
data from the provider in GenerateAndroidBuildActions and
AndroidMkEntries.
I did have to add two fields to the provider for this.
To ensure the symlinks always resolve to a physical file, I also added
goals such that building `derived-target` will also build `build-target`
Create new Make variable: LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES
for tasks/general-tests.mk,device-tests.mk to read.
This allows "support" files that are installed with soong rules rather
than make rules to still end up in the zips.
Sample dir structure:
% tree -ls testcases aosp_cf_x86_64_phone[4:31:54]/0
[ 4096] testcases
├── [ 4096] FrameworksServicesTests
│ ├── [ 4096] data
│ │ └── [ 851] broken_shortcut.xml
│ ├── [ 2800] FrameworksServicesTests.config
│ ├── [ 12695] JobTestApp.apk
│ ├── [ 8599] MediaButtonReceiverHolderTestHelperApp.apk
│ ├── [ 16791] SimpleServiceTestApp1.apk
│ ├── [ 16791] SimpleServiceTestApp2.apk
│ ├── [ 16791] SimpleServiceTestApp3.apk
│ ├── [ 1017763] SuspendTestApp.apk
│ └── [ 4096] x86_64
│ └── [ 79827767] FrameworksServicesTests.apk
└── [ 4096] FrameworksServicesTests_contentprotection
├── [ 4096] data
│ └── [ 54] broken_shortcut.xml -> ../../FrameworksServicesTests/data/broken_shortcut.xml
├── [ 3005] FrameworksServicesTests_contentprotection.config
├── [ 41] JobTestApp.apk -> ../FrameworksServicesTests/JobTestApp.apk
├── [ 69] MediaButtonReceiverHolderTestHelperApp.apk -> ../FrameworksServicesTests/MediaButtonReceiverHolderTestHelperApp.apk
├── [ 52] SimpleServiceTestApp1.apk -> ../FrameworksServicesTests/SimpleServiceTestApp1.apk
├── [ 52] SimpleServiceTestApp2.apk -> ../FrameworksServicesTests/SimpleServiceTestApp2.apk
├── [ 52] SimpleServiceTestApp3.apk -> ../FrameworksServicesTests/SimpleServiceTestApp3.apk
├── [ 45] SuspendTestApp.apk -> ../FrameworksServicesTests/SuspendTestApp.apk
├── [ 36] test_module_config.manifest
└── [ 4096] x86_64
├── [ 64] FrameworksServicesTests.apk -> ../../FrameworksServicesTests/x86_64/FrameworksServicesTests.apk
└── [ 36] UNUSED-FrameworksServicesTests.apk
Test: m clean && atest FrameworksServicesTests_contentprotection
Test: m clean && atest CtsDevicePolicyManagerTestCases_ParentProfileApiDisabled
Bug: b/332320956
Change-Id: I8466f253fa559bc74cef4533edf263650e96bbfb
Diffstat (limited to 'tradefed')
-rw-r--r-- | tradefed/providers.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tradefed/providers.go b/tradefed/providers.go index 66cb6253b..0abac1279 100644 --- a/tradefed/providers.go +++ b/tradefed/providers.go @@ -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]() |