aboutsummaryrefslogtreecommitdiff
path: root/apex/apex_test.go
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "Implement API surface import with APEX stub"Kiyoung Kim2023-03-061-18/+163
|\
| * Implement API surface import with APEX stubKiyoung Kim2023-02-271-18/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement APEX stub of API surface so any stub can be replaced with API surface when APEX stub interface is required. Unlike other stub interface, APEX stub can be decided if it should be used after APEX postdeps mutator analyzes which modules should be included in which APEX. To cover this, APEX stub is being added to the dependency if the dependency should not be covered with LLNDK or NDK stub, and APEX stub exists. From depsToPaths, if dependency to both original module and API library exists, then it choose one of the dependency and ignore the other. To cover this logic, a new property is added to the api_surface : apex_libs. This is introduced as it is difficult to gather all api library with apex stub before DepsMutator. Bug: 264963986 Test: cf_x86_64_phone_vendor build succeeded Change-Id: I9f0b1f70968e32eba94d3e0d7bb1f4bb29ff2438
* | Merge "Add apex.use_file_contexts_as_is property"Jooyung Han2023-03-021-0/+37
|\ \
| * | Add apex.use_file_contexts_as_is propertyJooyung Han2023-02-281-0/+37
| |/ | | | | | | | | | | | | | | | | When set true, use file_contexts file as is and do not force-label / and /apex_manifest.pb Bug: 268439003 Test: m (soong tests) Change-Id: I252eef9569deeac87bb71a3425a8eb07bab3c634
* | Merge "Disable strict_updatability_linting"Cole Faust2023-02-281-181/+182
|\ \
| * | Disable strict_updatability_lintingCole Faust2023-02-281-181/+182
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | strict_updatability_linting currently only makes it so that NewApi can't be added to the lint baseline. However, since we're updating NewApi to work on a lot more apis than before, we need to baseline many issues across the android tree. Temporarily disable strict_updatability_linting so that we can add these baselines. Bug: 193460475 Test: Presubmits Change-Id: I8d92df95a46e9b903f0cc0e3be56f17722c50430
* | Merge "Update usages of min_sdk_version that relies on (kind+level)"Spandan Das2023-02-281-0/+28
|\ \ | |/ |/|
| * Update usages of min_sdk_version that relies on (kind+level)Spandan Das2023-02-271-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type of min_sdk_version is being migrated from android.SdkSpec(kind+level) to android.ApiLevel(level). This affects `ShouldSupportSdkVersion` for java modules. This function skips the check for modules compiling against `core`, and that requires access to SdkVersion and not MinSdkVersion after the migration. Skip the check explicitly using SdkVersion. Test: go test ./java Test: No change in ninja file Bug: 208456999 Change-Id: I14eca4f8e8c5d7477ded00c4fe54097323fab4a2
* | Merge "Revert "Support overriding APEX java contents""Anton Hansson2023-02-241-91/+0
|\ \ | |/ |/|
| * Revert "Support overriding APEX java contents"Anton Hansson2023-02-241-91/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit be90172f0a7c7783f2ec100bdb0755b1fdc8fb9f. Reason for revert: not used, and not desired Bug: 270542561 Test: presubmit Change-Id: I415440dbae965f3c07c6f3ccf6ab4bc9ec57fbf6
* | Fix symlinks from APEX to partitionsJiyong Park2023-02-171-4/+28
|/ | | | | | | | | | | Previously, the symlink optimization for APEXes assumed that the target of the symlinks are in the system partition. The assumption however doesn't hold always because the file that was added to the APEX might be with system_ext_specific: true or vendor: true. Bug: 265598720 Test: m nothing Change-Id: Ieb9a6769320c0ec697a88c0cae977e7d65288362
* Merge "Properly check the deapexed files in tests."Jiakai Zhang2023-02-101-5/+31
|\
| * Properly check the deapexed files in tests.Jiakai Zhang2023-02-101-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | The tests in bootclasspath_fragment_test setup the environment to have two APEXes: a source one and a prebuilt one. Before this change, the tests for prebuilt incorrectly check the contents in the source one. This change introduces a new function that properly checks files deapexed from the prebuilt one. Bug: 241823638 Test: m nothing Change-Id: I1865c20b198d50e7ebc8ebfb9f7c71394a225ab7
* | Revert "Revert "Remove apex.apex_name""Jooyung Han2023-02-091-42/+1
|/ | | | | | | | This reverts commit d1209a89c709af09f82c100e23a743ebdc660622. Reason for revert: apex_name was still in use in the internal/intermediate branch. Fixed(removed apex_name) in the internal branch. Change-Id: I10b8e0cfdb01dcdb6b623bddf9c04f4dac71fc90
* Revert "Remove apex.apex_name"Marco Loaiza2023-02-081-1/+42
| | | | | | | | | This reverts commit df26332d50c9c156b13844b4dbbecb43df6e3e1c. Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_sunfish-userdebug&lkgb=9578804&lkbb=9579062&fkbb=9578931, bug b/268301897 Change-Id: I819a416286cda63a6fa8d3d6b4343c86638b4dc9 BUG: 268301897
* Remove apex.apex_nameJooyung Han2023-02-081-42/+1
| | | | | | | | | | | | | | apex_name was used to install symbol files under /apex/<apex name>, which caused duplicate rules when there's two apexes with the same apex_name. (e.g. override_apex or multi-install apexes) Since symbol files can be looked up via ELF Build-Id, we don't have to install symbol files with the actual "apex name", but instead we can install them with soong module name. Bug: 267581665 Test: m (soong test) Change-Id: I1cbe5c86d287f180c7deef93ba85ea5552680011
* VNDK APEX doesn't use "apex_name" propertyJooyung Han2023-02-071-8/+3
| | | | | | | | | | | | | | | | VNDK APEX has been using "apex_name" property to set "name" field in apex_manifest. But setting apex_name had a side-effect of emitting duplicate rules for symbol files for VNDK APEX and its override_apex. (Please see the removed comments for more details about error) Not using "apex_name" fixes the duplicate errors. There're a few more vendor apexes with the same issue, which I will handle in follow-ups. Bug: 267581665 Test: m (soong test) && boot Change-Id: I00f617cef8af4d21880d4e8b9c0b9ab9322ba15c
* apexer: remove --do_not_check_keynameJooyung Han2023-02-061-2/+0
| | | | | | | | | | | | | Since fe4ff29b4d47fa8ae242fb7e084215d3afada4b5 (in system/apex), apexer doesn't check keyname (--key vs --manifest.name). So, passing --do_not_check_keyname doesn't make any sense. This is a preparation to remove (or deprecate) "apex_name" property from "apex" module. Bug: 267581665 Test: m Change-Id: I3737d1e36d305375a523a23a6bbeb2d23586e578
* Add soong unit test for trimmed apex buildDennis Shen2023-02-011-0/+67
| | | | | | BUG: b/259381334 TEST: m nothing Change-Id: I49e5d31a6f5c4f9a72a6a4b3b2ab7114b996adbc
* Merge "Revert "Don't add flattened files apex as dependencies of an image apex""Diwas Sharma2023-01-271-11/+23
|\
| * Revert "Don't add flattened files apex as dependencies of an image apex"Diwas Sharma2023-01-271-11/+23
| | | | | | | | | | | | | | | | This reverts commit eb8cd3122a7e9f263099462f4e6d770b25d8d112. Reason for revert: mainline module jacoco jar do not contain JAVA_LIBRARIES needed for coverage, see: b/266679012 Change-Id: If756f7aaf40c6bcfed170c59c494bcc426620039
* | Merge "Read ApexMkInfo for modules to be installed."Treehugger Robot2023-01-271-5/+5
|\ \
| * | Read ApexMkInfo for modules to be installed.Jingwen Chen2023-01-271-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This piggybacks onto the ApexInfo cquery handler, so we're issuing a single bazel query call that reads two providers in the starlark expr. Also rename requiredDeps to makeModulesToInstall to differentiate it from APEX's required/provided libs in the apex manifest. Test: unit test Test: mkdiff Fixes: 263123189 Change-Id: Ib7e43f1586f29864eee8627dba3631bfaff27afa
* | Merge "Delete __ANDROID_APEX_MIN_SDK_VERSION__ from Soong"Vinh Tran2023-01-251-9/+4
|\ \ | |/ |/|
| * Delete __ANDROID_APEX_MIN_SDK_VERSION__ from SoongVinh Tran2023-01-201-9/+4
| | | | | | | | | | | | | | | | | | | | Currently, Bazel sets __ANDROID_APEX_MIN_SDK_VERSION__ based on the cc library's min_sdk_version while Soong does based on apex's min_sdk_version. This causes a diff in the clang commands. Digging further, we realized __ANDROID_APEX_MIN_SDK_VERSION__ isn't used anywhere so we might just delete it altogether instead of fixing it. Bug: 265134933 Test: presubmit Change-Id: I08e89dc8f6ef86669248ea5c47de6603e9d2ffbb
* | Don't add flattened files apex as dependencies of an image apexCole Faust2023-01-191-23/+11
|/ | | | | | | | | The image apex does not need all the files that make up a flattened apex. Bug: 254205429 Test: go tests Change-Id: I7c574c5b30b55ab6d1b3981ee26d168c2f2427c4
* apex_vndk doen't need stub variantsJooyung Han2022-12-211-10/+38
| | | | | | | | | | | | | | | This was revealed by the new check added in Ib3c6efd16bdf13b59f79be66d4f9dba49100f6cc. This was okay since the old implementation relied on the fact that impl variant comes before stub variants. To make the new check happy and keep the intention explicit, stub variants are not added to VNDK apex. Bug: 191770320 Test: m (apex_test) Change-Id: I455f2c9b6bc471c579379286c0198f36d325adf6
* Check for duplicate bundled files from different modules.Jooyung Han2022-12-211-0/+36
| | | | | | | | | | | A single file generated by different modules is almost never correct; make it an error. The check is skipped for some error cases, which will be handled in follow-ups. Bug: 191770320 Test: m (soong test) Change-Id: Ib3c6efd16bdf13b59f79be66d4f9dba49100f6cc
* mixed builds: Make apex's GetBazelLabel return the label of the ↵Jingwen Chen2022-12-201-96/+0
| | | | | | | | | | | override_apex, if applicable. And add test1_com.android.tzdata to prod allowlist. Fixes: 261054570 Bug: 261054570 Test: mkcompare Change-Id: I314a4e44ade958ba9a91f71430d76175d734579e
* Add ApexInfo.RequiresLibs to mixed build handler for apexVinh Tran2022-12-141-1/+4
| | | | | | | | | | | | | | | | | Adding ApexInfo.RequiresLibs from Bazel to apexBundle.requiredDeps which is eventuallyread by apex androidmk writer for LOCAL_REQUIRED_MODULES to ensures the libs are installed as part of a bundle build. In Soong, apexBundle.requiredDeps is set in https://cs.android.com/android/platform/build/soong/+/master:apex/apex.go;l=2305-2323;drc=cb7e73bc0130a95f5991c925c349387185abc098 The same logic is replicated in Bazel at https://cs.android.com/android/platform/build/bazel/+/master:rules/apex/cc.bzl;l=141-163;drc=cb7e73bc0130a95f5991c925c349387185abc098. This CL is porting the required libs set by Bazel in mixed build. Test: go test Test: run build/bazel/ci/mixed_libc.sh Bug: 215500321 Change-Id: Id7256d279ac09a8fd42db391a7e93ce0021d8345
* Streamline AndroidMk generationSasha Smundak2022-12-121-11/+11
| | | | | | | | Add AndroidMkEmitAssignList to emit a line to assign the items from the given list of string arrays. Test: treehugger Change-Id: Id5acbef38ea4e91349bd2461f226db352d4b8123
* Add option to override defaultManifestVersionSahana Rao2022-12-061-0/+35
| | | | | | | | | | | | | | | | Add an option to override defaultManifestVersion using environment variable. The environment variable will be used to override the apex version locally when developing a desert release feature in mainline-prod branch. Overriding the apex version in mainline-prod branch allows us to install apex built in mainline-prod branch to device running code from git_master which has a higher apex version than mainline-prod branch. Bug: b/233608815 Bug: b/196860838 Test: presubmit Test: go test -v ./build/soong/apex/ Change-Id: I8ac2aae2b6b29da7f09db6edb893e0a0f0691e51
* Ignore native bridge archs for apex selectionAnton Hansson2022-11-291-0/+24
| | | | | | | | | | | | This leads to an arm64 apex being used on a device that is mixed x86_64 with nativebridge=arm64. A device like that doesn't appear to work with arm64 binaries. For example, the boringssl-self-check binary crashes on boot. Bug: 260115309 Test: unit test Test: boot emulator with this combination Change-Id: Ic4a91974290a05b1799f755fcf52ef226d68f4c2
* Add support of <APEX>-installed-files.txt in mixed build.Wei Li2022-11-111-0/+8
| | | | | | Bug: 239084750 Test: CIs Change-Id: Ie3823d1a620c3924111e71aa97df727565261c98
* Merge "Revert "Don't add flattened files apex as dependencies of an image apex""Prerana Patil2022-11-091-3/+17
|\
| * Revert "Don't add flattened files apex as dependencies of an image apex"Prerana Patil2022-11-091-3/+17
| | | | | | | | | | | | | | | | This reverts commit b81814a7b4eb2d891792d402c4102533c2f611b2. Reason for revert: breaking build 9271471 Change-Id: I1876f45b79779d7e8ec46a78bf71bf7fec09e62b
* | Connect base.zip to mixed buildsLiz Kammer2022-11-091-0/+10
| | | | | | | | | | | | Test: go test soong tests Test: mixed_droid Change-Id: Iaf1fbd1e7cde63892b01a9c9f4cd29ae69e2d6e3
* | bazel apex: Add mixed builds support for <module>_using.xml file.Jingwen Chen2022-11-091-5/+10
| | | | | | | | | | | | | | | | | | This file contains the java APIs parsed by the 'dexdeps' tool within the gen_java_usedby_apex.sh. Bug: 239084755 Fixes: 239084755 Test: presubmits Change-Id: Ia271783a6be3ea3a343481306cde1aaba2166e88
* | Merge "Don't add flattened files apex as dependencies of an image apex"Treehugger Robot2022-11-091-17/+3
|\|
| * Don't add flattened files apex as dependencies of an image apexCole Faust2022-11-041-17/+3
| | | | | | | | | | | | | | | | | | The image apex does not need all the files that make up a flattened apex. Bug: 254205429 Test: go tests Change-Id: Iff05f2d01f11397bc9e9bf31868112575268969b
* | bazel apex: Add mixed builds support for <module>_using.txt file.Jingwen Chen2022-11-071-4/+9
| | | | | | | | | | Test: presubmits Change-Id: I7203fcccb09f6c93e702550ffa47a4029c3351dd
* | Add apex_test for mixed buildsLiz Kammer2022-11-071-0/+65
| | | | | | | | | | Test: go test soong tests Change-Id: I33327e1fe7d6a4bbf32890d9fbd5453c28a9c5b1
* | Merge "Remove unnecessary TestMain()"Treehugger Robot2022-11-051-5/+0
|\ \
| * | Remove unnecessary TestMain()Liz Kammer2022-11-041-5/+0
| |/ | | | | | | | | Test: go test Soong tests Change-Id: I2a8710361b1a32d71417b6c7bbc19e87fa8b36ae
* / Add exclude_* properties to apex arch-specific propertiesColin Cross2022-11-021-0/+16
|/ | | | | | | | | | The libcronet prebuilt JNI library doesn't exist for riscv64 yet. Add exclude_* properties to apex arch-specific properties so that the libcronet dependency can be excluded from the apex that contains when the arch is riscv64 until it exists for riscv64. Test: TestApexWithArch Change-Id: Ic395a077824f0f60b90178530fbfae8a96b3782f
* Merge "Default apex's compile_multilib to "first" in bp2build"Vinh Tran2022-10-171-0/+70
|\
| * Default apex's compile_multilib to "first" in bp2buildVinh Tran2022-10-131-0/+70
| | | | | | | | | | | | | | | | | | | | In Soong, decodeMultilib, used to get multilib to determine the dep variations, return "first" if defaultMultilib is set to "common". apex sets defaultMultilib to "common" which means equivalent compileMultilib in bp2build for apex should be "first" (See new Soong unit tests for more context). This CL fixes bp2build for apex to be more correct. Bug: 251559512 Test: go tests Change-Id: Id1cb4407980fc1fab91822c81326f37fb4adfa0a
* | Move checking of minApiForArch for apex into ccColin Cross2022-10-071-0/+32
|/ | | | | | | | | | | | | | | | I49220cbec628f1508709741dc56b62aaac7786d9 attempted to allow apexes to depend on native code whose min_sdk_version had been increased to meet the minimum supported API level for a new architecture. It wasn't quite right, as it assumed that the primary architecture of the apex would be the newest, and it applied to all dependencies, not just ones that were specfiic to the new architecture. Move the checking into cc.ShouldSupportSdkVersion, where it can be specific to an individual architecture variant. Bug: 250918230 Test: TestApexMinSdkVersion_MinApiForArch Change-Id: I303cf485ba54b4c6bf63a9f9b49286ff9b2c9c83
* Merge "Put base APK when AppSet is included in APEX"Treehugger Robot2022-09-301-3/+4
|\
| * Put base APK when AppSet is included in APEXJiyong Park2022-09-291-3/+4
| | | | | | | | | | | | | | | | | | This change fixes a bug that base APK of an AppSet is not put into the APEX. Bug: 236299724 Test: m nothing Change-Id: I1010ec66d8551fcc1e2d9119be7ecdba22186607