aboutsummaryrefslogtreecommitdiff
path: root/apex/apex_test.go
Commit message (Collapse)AuthorAgeFilesLines
...
| * static rust binaries are also prohibited in APEXesJiyong Park2021-08-031-0/+24
| | | | | | | | | | | | | | | | | | | | Also fixes a bug that the test runs for host APEXes like com.android.art.host. Bug: 185971244 Test: m Test: build mainline_modules target on aosp-master Change-Id: Ie2012adbf2f4eda5454d5eaa30f128fb1e20ad37
| * Revert "Revert "Prohibit static executable in APEX""Jiyong Park2021-08-031-3/+27
| | | | | | | | | | | | | | | | This reverts commit 2125aab5043c05953505563ed505a7e64fc9f668. Reason for revert: relanding along with a forward fix Change-Id: Ib0283ca6beefa2f3073860287d00553ad0af6317
* | Merge "Revert "Prohibit static executable in APEX"" am: 2fe71a5165 am: ↵Jiyong Park2021-08-031-27/+3
|\| | | | | | | | | | | | | | | 2af22b8729 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1784474 Change-Id: I125a2dfb96277064ff7daa195d4a80c315655879
| * Revert "Prohibit static executable in APEX"Yen-Chao Chen2021-08-031-27/+3
| | | | | | | | | | | | | | | | This reverts commit 3a8130c797cd762427698f6a6245bba4c84c2e4b. Reason for revert: Build failed. Change-Id: I28c72c8c3adaeb23bff9bffe3994971aa3f2e4f4
* | Merge "Prohibit static executable in APEX" am: d8a3513155 am: 7986f564b6Jiyong Park2021-08-031-3/+27
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1779746 Change-Id: Iefdcf93ceb0d0b9654afffe0c03be28af33a9eaf
| * Prohibit static executable in APEXJiyong Park2021-07-271-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | If a library is statically included in a static executable, it's behavior is different from the case where the same library is statically (or dynamically) linked to a non-static executable. To reduce the number of test configs that we need to consider, it is required to prohibit static executables in APEXes. Bug: 185971244 Test: m Change-Id: I0cd8fca669d55088e2329fef1f859eeb297502dd
* | Merge "Rename UpdatableBootJars to ApexBootJars." am: 4102c0cc47 am: adb9e9f752satayev2021-07-261-5/+5
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773912 Change-Id: Iecc5f48620b2d4e5390ab9a081b2193924bd0dda
| * Merge "Rename UpdatableBootJars to ApexBootJars."satayev2021-07-261-5/+5
| |\
| | * Rename UpdatableBootJars to ApexBootJars.satayev2021-07-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that ART apex boot jars and core-icu4j are exceptions here as they are not part of ApexBootJars. ART apex boot jars are defined in their own variable, while core-icu4j is treated as a regular non-updatable boot jar. Bug: 191127295 Test: atest CtsClasspathsTestCases Change-Id: I3cea3d82ef521655a1a5ffa8cae2258ab9d08bfc
* | | Merge "Require prebuilt_bootclasspath_fragment to provide hidden API files" ↵Treehugger Robot2021-07-201-20/+66
|\| | | | | | | | | | | | | | | | | | | | | | | am: 41461f3660 am: 70d39ce053 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1772628 Change-Id: I276e323889e5a70ddf56b7ca71add649858c32a1
| * | Require prebuilt_bootclasspath_fragment to provide hidden API filesPaul Duffin2021-07-201-20/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the prebuilt_bootclasspath_fragment was not required to provide hidden API files as not all usages of that module provided them. That should no longer be the case so this change makes the prebuilt_bootclasspath_fragment stricter and so now always require them. Bug: 194063708 Test: m out/soong/hiddenapi/hiddenapi-flags.csv - check that this does not change the contents. Change-Id: I3f19a1b4246f09a927c0f6b0f41b8678150d6cc2
* | | Merge changes I343712d7,Ic076ea85 am: 9c01fc686d am: 93ece5b8e2Treehugger Robot2021-07-201-6/+30
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1772627 Change-Id: Id0587dc7c2a4e1019f3699aa3b3b7e5015e5e2e5
| * | Improve hidden API checking in TestBootDexJarsFromSourcesAndPrebuiltsPaul Duffin2021-07-201-6/+30
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the test only checked how the intermediate index file was created from class jars. This change also checks how the monolithic index file was created from the intermediate index file and the index files generated from each bootclasspath_fragment. At the moment the checks reveal that the monolithic index file is created solely from the intermediate index file. However, a follow up change to Soong will alter the behavior of the test. Bug: 194063708 Test: m nothing Change-Id: I343712d7d17ab0a07f5b32226321fc6815847e1f
* | Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source ↵Treehugger Robot2021-07-141-6/+22
|\| | | | | | | | | | | | | | | module" am: 257608f993 am: 64614bbcff Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1758354 Change-Id: Ibd345e6d76706c54d5cfb0799d80f5d107332f78
| * SdkLibraryImport's DexJarInstallPath uses installPath from source moduleJeongik Cha2021-07-131-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though actual installed module path is the same as source module, it uses impl's one. Bug: 188179858 Bug: 193082464 Test: compare dexpreopt_config.zip files from 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip 2. m dexpreopt_config_zip (note that m clean should run between steps) Test: build aosp_cf_x86_64_phone, launch_cvd, and then adb wait-for-device \ && adb root \ && adb logcat \ | grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1 and then check if there is no message. Change-Id: I34ffd9a2d214a6614c2befc35b2beec003cfcd25
* | Merge "Fix inconsistencies in the apex names used for the apex variations." ↵Treehugger Robot2021-06-251-2/+55
|\| | | | | | | | | | | | | | | am: f46e95899b am: 28bbdf23f7 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748294 Change-Id: I930769a7d48eedace77d12cf51f1e50ebb874cbb
| * Fix inconsistencies in the apex names used for the apex variations.Martin Stjernholm2021-06-251-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an apex_name property to prebuilt APEX modules to allow specifying the "runtime" name of the APEX, i.e. the one it gets mounted as in /apex/, which is also the one used for the apex variations. Introduce a callback to retrieve that name consistently for all APEX modules (apex, override_apex, prebuilt_apex, and apex_set), and update some apex mutator code paths to use it. For APEX source modules (apex and override_apex), it's necessary to add a new field in apexBundle, since the name property gets overridden for the override variant that override_apex creates. Test: m nothing Bug: 191269918 Change-Id: If8612639bffdf91cbcab3387b0603bf5dffef1f5
| * Add platform_apis property to APEX module typeJiyong Park2021-06-241-0/+73
| | | | | | | | | | | | | | | | | | | | | | The property is used to allow non-updatable APEXes to use platform APIs (e.g. symbols marked as "# platform-only"). Bug: 191637950 Test: m com.android.virt com.android.compos Merged-In: Id2410b4e38a78ec2146a42298840954381a7c472 Change-Id: Id2410b4e38a78ec2146a42298840954381a7c472 (cherry picked from commit fb63625a7f147735f97d5cc9eaabf3f93cf0d0a2)
| * Rust module in APEX uses stub libraries across APEX boundariesJiyong Park2021-06-241-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug that rust module in APEX has access to private symbols of a native library even when the native library is outside of the APEX. To fix this, the stub selection logic in the cc package is exctacted as a function ChooseStubOrImpl and is used also in the rust package. Bug: 190767845 Test: m Merged-In: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a Change-Id: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a (cherry picked from commit 3b5f88e0913f3df579f4dc0c87daac88665b1073)
* | Add platform_apis property to APEX module typeJiyong Park2021-06-241-0/+73
| | | | | | | | | | | | | | | | | | | | | | The property is used to allow non-updatable APEXes to use platform APIs (e.g. symbols marked as "# platform-only"). Bug: 191637950 Test: m com.android.virt com.android.compos Merged-In: Id2410b4e38a78ec2146a42298840954381a7c472 Change-Id: Id2410b4e38a78ec2146a42298840954381a7c472 (cherry picked from commit fb63625a7f147735f97d5cc9eaabf3f93cf0d0a2)
* | Rust module in APEX uses stub libraries across APEX boundariesJiyong Park2021-06-241-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug that rust module in APEX has access to private symbols of a native library even when the native library is outside of the APEX. To fix this, the stub selection logic in the cc package is exctacted as a function ChooseStubOrImpl and is used also in the rust package. Bug: 190767845 Test: m Merged-In: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a Change-Id: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a (cherry picked from commit 3b5f88e0913f3df579f4dc0c87daac88665b1073)
* | Merge "VNDK APEX: skips VNDK-Ext" am: 17c4507dec am: 125bba00cfsatayev2021-06-231-47/+96
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744554 Change-Id: Ic32f9b3df65b747e5126a50d65b472f4fe3df9df
| * Merge "VNDK APEX: skips VNDK-Ext"satayev2021-06-231-47/+96
| |\
| | * VNDK APEX: skips VNDK-ExtJooyung Han2021-06-241-47/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | In legacy VNDK mode (DeviceVndkVesion=""), the check was missing. We don't want VNDK-Ext in VNDK APEX in any case. Bug: 191770320 Test: m nothing Change-Id: I08f36a4c1696bf82d25d629841e172d2716a366d
* | | Merge "fix: comparison between min_sdk_version" am: 91913e3e07 am: bdafb79af7Jooyung Han2021-06-231-0/+30
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743953 Change-Id: Id481769c8852103cb3690911e44d103b0f9cbe6a
| * | Merge "fix: comparison between min_sdk_version"Jooyung Han2021-06-231-0/+30
| |\ \ | | |/ | |/|
| | * fix: comparison between min_sdk_versionJooyung Han2021-06-231-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added test demonstrates the error case. The bug was that java modules' ShouldSupportSdkVersion() converts min_sdk_version into effective version before comparison, which discards "preview" version into "future" version. That caused a weird case like rejecting with error "should support "S"" even when it is set to "S". Bug: n/a Test: m nothing Change-Id: Ieb53f0097b2969a8535778b1286dbfa0d4895ad4
* | | Merge "Fix monolithic hidden API processing with prebuilts" am: a1a2baf8a7 ↵Paul Duffin2021-06-221-3/+5
|\| | | | | | | | | | | | | | | | | | | | | | | am: 3adbb7cb05 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738977 Change-Id: I46c8714db2a0f357c573e34b9b4d26c946fa0878
| * | Fix monolithic hidden API processing with prebuiltsPaul Duffin2021-06-201-3/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prebuilt modules do not provide classesJars containing annotations. Previously, the monolithic hidden API processing just used classesJars from all the modules that provided them so when building against prebuilts would have fewer classesJars than when building against sources and so would produce different hidden API flags. This change will generate the monolithic files from both classesJars and files previously generated from hidden API processing. A fragment that has performed hidden API processing will contribute its generated files whereas standalone libraries and fragments which have not performed hidden API processing will contribute classesJars. Bug: 177892522 Test: m out/soong/hiddenapi/hiddenapi-flags.csv m SOONG_CONFIG_art_module_source_build=false out/soong/hiddenapi/hiddenapi-flags.csv - verify that the files are identical whether built from source or prebuilts. Change-Id: I06f3c7df49626bec21a452bc9abf1bb9e7545e5c
* | Merge "Make CheckHiddenAPIRuleInputs more reusable" am: 07cdd37ae5 am: ↵Paul Duffin2021-06-211-16/+16
|\| | | | | | | | | | | | | | | f250ea10e4 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738976 Change-Id: Ie1bb89d1b2aaf55ce0ee4ad9891cd891bc464096
| * Make CheckHiddenAPIRuleInputs more reusablePaul Duffin2021-06-201-16/+16
| | | | | | | | | | | | | | | | | | Adds a message parameter and allows leading spaces in the expected file string to allow them to be nicely indented. Bug: 177892522 Test: m nothing Change-Id: I33df26610738c48879fa0b8250dc377dd04bb07d
* | Merge "Use classpath elements in platform_bootclasspath" am: 9d31361873 am: ↵Paul Duffin2021-06-211-50/+115
|\| | | | | | | | | | | | | | | 5805a4f34a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738975 Change-Id: Ia072fc05e1f63b409ba8e837bd809af505b4f4e6
| * Use classpath elements in platform_bootclasspathPaul Duffin2021-06-201-50/+115
| | | | | | | | | | | | | | | | | | | | | | | | Use classpath elements in newMonolithicHiddenAPIInfo. That means the method can collate information from both fragments and libraries rather than just fragments. So, this change moves the collation of the classesJars into the method. Bug: 177892522 Test: m out/soong/hiddenapi/hiddenapi-flags.csv out/soong/hiddenapi/hiddenapi-index.csv - make sure that this change does not affect the contents. Change-Id: I7c2a229fab60d02bd211438735a8d7303ed83386
* | Merge "Add classpath fragment property to skip proto generation." am: ↵satayev2021-06-181-0/+41
|\| | | | | | | | | | | | | | | f45966f35b am: 6ea9e45d9c Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738336 Change-Id: I8382015b96a37117e62735a6d5a682c3645c397f
| * Merge "Add classpath fragment property to skip proto generation."satayev2021-06-181-0/+41
| |\
| | * Add classpath fragment property to skip proto generation.satayev2021-06-171-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This must always be true for updatable apexes, but is not necessary for non-updatable apexes like com.android.i18n. In a follow up this will be used to figure out whether apex boot jars should be bundled into platform_bootclasspath. Bug: 191127295 Test: atest CtsClasspathsTestCases derive_classpath_test Change-Id: Ib7dc5b057cb24955222fb97f3ff9da079f30ed77
* | | Merge "Combine hidden API encoding with flag generation" am: 975e757232 am: ↵Paul Duffin2021-06-171-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | b9b5bcf0e3 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736225 Change-Id: I3197f3def4688fdeaeddc920cc55fc6364599b9a
| * | Combine hidden API encoding with flag generationPaul Duffin2021-06-171-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the rules to perform hidden API encoding were generated separately to the rules to perform hidden API flag generation. This change combines them within the (renamed) produceHiddenAPIOutput() method and makes the paths to the encoded dex files an output of the generateHiddenAPIBuildActions method alongside the paths to the generated flag files. As encoded dex jars are now an output of the produceHiddenAPIOutput() method which is implemented for both prebuilts and source bootclasspath_fragment modules that necessitated the prebuilt also providing paths to encoded dex files. That in turn required updates to some of the tests to provide dex files from prebuilt_apex modules. Similarly, as the produceHiddenAPIOutput() method may not be called for some bootclasspath_fragment modules as they do not yet provide all the information needed to perform hidden API encoding then it is necessary to extract the encoded dex files produced by the modules themselves. That also required a few changes to tests that did not previously provide dex files. Bug: 177892522 Test: m com.android.art - check that this change does not change the contents of the apex file, i.e. is byte-for-byte identical. Change-Id: I60996a34d06ed1c87ed244ab3509621999ad86ec
* | Merge "Create APEX variant for prebuilt_apex/apex_set" am: 2960e9bdf2 am: ↵Paul Duffin2021-06-171-8/+8
|\| | | | | | | | | | | | | | | 70fc36a6fc Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738034 Change-Id: I0cf928c7649040fe588ae8ff9d7db55f4f6c7610
| * Create APEX variant for prebuilt_apex/apex_setPaul Duffin2021-06-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the prebuilt_apex/apex_set did not have an apex specific variant created which meant that they depended upon the platform variant of the modules it depended upon. This change creates an apex variant for them just as is done for the apex module type which causes it to depend upon the apex specific variant of the modules it depends upon. Test: m droid Bug: 179354495 Change-Id: I7d6f3609c267b3e90b90b9befe7d76f351a0c2bd
* | Merge "Make copyBootJarsToPredefinedLocations simpler and less fragile" am: ↵Paul Duffin2021-06-141-1/+1
|\| | | | | | | | | | | | | | | cc1bd8364a am: 174d9c7eec Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731414 Change-Id: I76746fa8b13b7b4632638ba211199d4d7b0d48d4
| * Make copyBootJarsToPredefinedLocations simpler and less fragilePaul Duffin2021-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, copyBootJarsToPredefinedLocations relied on all its parameters having the same length and the same order. That made it quite fragile as changes to one of the parameters without corresponding changes to the other would cause failures. It also combined the retrieval of the boot dex jars from the modules, handling of missing boot dex jar files and the generation of the rules to copy the files. This change separates the retrieval of boot dex jars and handling of missing files from the copying of those files while at the same time making the function less fragile by replacing the three ordered parameters with two maps that shared common keys. Bug: 179354495 Test: m nothing Change-Id: Idbcd24a7e8af89f7895a20aeddc58502dcbaad03
* | Merge "Use fingerprint when min_sdk is current or none" am: dddb0152a5 am: ↵Treehugger Robot2021-06-011-0/+73
|\| | | | | | | | | | | | | | | 6302bc5461 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1720035 Change-Id: I5985f1e80b2e38f0f6fb031f1706c3494170f9c7
| * Use fingerprint when min_sdk is current or noneLiz Kammer2021-05-271-0/+73
| | | | | | | | | | | | | | | | | | We have versions of the same apex targetting different min_sdk_versions; however, fingerprint is overriding the hardcoded min_sdk_version. We should only be overriding if it is current or unset. Test: go test apex soong tests Change-Id: Id030a5ba7d8edebb806ce83d318132fd839a00a5
* | Merge changes I0116f5f4,I950c9b54,I967f5c42 am: 4ab2dd1afe am: 7ca753793fColin Cross2021-05-271-0/+74
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1718475 Change-Id: I864c97d90aa8f2ec4e43ac9d39464ca257b608e2
| * Treat java libraries in classpath fragments as directly in apexColin Cross2021-05-261-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | Coverage is applied to java libraries that are directly in an apex. Mark java libraries that are in an apex through a bootclasspath_fragment or a systemserverclasspath_fragment as directly in the apex by implementing CopyDirectlyInAnyApexTag on the dependency tags used for their contents. Bug: 183759446 Test: TestApexJavaCoverage Change-Id: I0116f5f415083b5194000988cb257454ef115200
* | Merge "Fix indexing bug when config.Arches() returns an empty array." am: ↵Martin Stjernholm2021-05-221-0/+22
|\| | | | | | | | | | | | | | | 22053dcbf2 am: 029005ee20 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1716108 Change-Id: I16798dc8a2d554c8f8562471d75227e8e807704d
| * Fix indexing bug when config.Arches() returns an empty array.Martin Stjernholm2021-05-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | This happens when com.android.art.host is not disabled in prebuilts/build-tools/build-prebuilts.sh. Test: m nothing Test: env OUT_DIR=out prebuilts/build-tools/build-prebuilts.sh on the aosp-build-tools branch Bug: 188922057 Change-Id: Ib21d17bb627e4cf7faee320febe65e1bb4566d4e
* | Merge "Refactor special handling of hidden API encoding for master-art" am: ↵Paul Duffin2021-05-141-1/+6
|\| | | | | | | | | | | | | | | fdd9743609 am: 1b5e8cdbee am: 23b34baa5c Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707569 Change-Id: I5dbe8a4c4fc0f4e8a91ec9c04f32a7d71f96715e
| * Refactor special handling of hidden API encoding for master-artPaul Duffin2021-05-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of encoding the hidden API with an empty set of flags when the monolithic flags are not available this simply disables encoding altogether which should have the same behavior at runtime. This change also removes the unused flags field in hiddenAPISingleton which was set but never read. Bug: 179354495 Test: m nothing Change-Id: I32d5825e5271829993dd4e5be4d4ee1b22fa7b22