From f216af5653fb8e8f2b9e34065b1ae05a70146f68 Mon Sep 17 00:00:00 2001 From: Ronald Braunstein Date: Thu, 11 Apr 2024 15:43:32 -0700 Subject: Change test_module_config from copying files to symlink files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- java/java.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 9fa6175ef..ccccbacdb 100644 --- a/java/java.go +++ b/java/java.go @@ -1504,6 +1504,8 @@ func (j *TestHost) GenerateAndroidBuildActions(ctx android.ModuleContext) { RequiredModuleNames: j.RequiredModuleNames(), TestSuites: j.testProperties.Test_suites, IsHost: true, + LocalSdkVersion: j.sdkVersion.String(), + IsUnitTest: Bool(j.testProperties.Test_options.Unit_test), }) } -- cgit v1.2.3-59-g8ed1b