aboutsummaryrefslogtreecommitdiff
path: root/apex/apex_test.go
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge changes from topic "canned_fs_config"Jiyong Park2021-12-151-14/+13
|\ \ | | | | | | | | | | | | | | | * changes: Add canned_fs_config to apex module type Build canned_fs_config using RuleBuilder
| * | Build canned_fs_config using RuleBuilderJiyong Park2021-12-151-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | ... in preparation for adding the support for custom canned fs config Bug: 209971551 Test: m nothing Change-Id: I7f2576ff99c65bdb6c9ce4ace61bc783eea2f0d4
* | | Merge "Do not allow duplicate deapexer dependencies."Martin Stjernholm2021-12-131-0/+69
|\ \ \ | |/ / |/| |
| * | Do not allow duplicate deapexer dependencies.Martin Stjernholm2021-12-071-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without these errors, the last encountered deapexer would silently be used. However with PRODUCT_INSTALL_APEXES there will only be deapexer for installable APEXes, and we can assume only a single installable APEX exists for each APEX variant, so make it an error if it isn't the case. Corresponding to http://ag/15156931. Test: m nothing SOONG_CONFIG_art_module_source_build=true Test: m nothing SOONG_CONFIG_art_module_source_build=false Test: m nothing SOONG_CONFIG_art_module_source_build=false with installable:true for the com.android.art.debug prebuilt APEX - check that it fails with an "ambiguous duplicate deapexer" error Bug: 192006406 Bug: 192542393 Change-Id: I44566fd26b12f82a8a67fe4a69e56303460756d0
* | | Relax apex package restriction for T+ jarsRemi NGUYEN VAN2021-12-091-2/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ART AOT exemption only applies to Q/R/S, so module jars that have min_sdk T+ do not need to follow the module package restriction, even if they are part of a Q/R/S module (but not loaded on Q/R/S). Relax the restriction to only apply to jars that have min_sdk before T. Bug: 208773835 Test: m (runs apex tests) Change-Id: I2c3ad8984ca05ad763bf6162bd478f93ab4ee650
* | | Allow java_sdk_library in an APEX to have higher min_sdk_version.satayev2021-12-081-0/+178
|/ / | | | | | | | | | | | | | | | | | | | | | | Inidividual boot or system server jars may have higher min_sdk_version than the contianing apex, since the runtime respects the values of min/max_sdk_version; e.g. runtime would not load a boot jar with higher min_sdk_version. This allows shipping new boot jars via apexes that target older platforms. Bug: 190818041 Test: presubmit Change-Id: I08ec0b4463a17bc8265b948fe09da55eb4e52ac3
* | Merge "Add ART boot image profile to the ART APEX."Jiakai Zhang2021-12-071-0/+1
|\ \
| * | Add ART boot image profile to the ART APEX.Jiakai Zhang2021-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need the profile when we generate the primary boot image on device. Bug: 203492478 Test: Run `banchan com.android.art x86_64 && m` and see `$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof`. Test: Run `lunch aosp_cf_x86_64_phone-userdebug && m` and see both `$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof` and `$ANDROID_PRODUCT_OUT/system/etc/boot-image.prof`, in different sizes. Test: Start Cuttlefish with the built image and see both `/apex/com.android.art/etc/boot-image.prof` and `/system/etc/boot-image.prof` on device. Change-Id: Id879dc49b234133dfbb9563814328661a1f4a6c0
* | | Forbid updatable: true on vendor APEXes.Daniel Norman2021-12-021-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Vendor APEXes do not formally support updates outside of the main OTA process. We should clarify this at build time. Test: set vendor apex to updatable, observe failure Test: apex_test.go Change-Id: Ife8d242a42415ebf00d7dced72c07cda1fde1839
* | | Merge "Add Sh_binaries property"Treehugger Robot2021-12-021-1/+1
|\ \ \ | |/ / |/| |
| * | Add Sh_binaries propertySundong Ahn2021-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sh_binary module is not supported the vendor variant. So, even if there is "vendor: true" in sh_binary module, the image variant is "image:" instead of "image:vendor.Tiramisu". But the vendor APEX has vendor variant, so vendor APEX module and sh_binary module have different variants and the sh_binary cannot be added to vendor apex. So the Sh_binaries property is added, and the image variant is removed at DepsMutator. Bug: 205065320 Test: make -j40 && sh_binary is added to vendor APEX && install check Change-Id: I30e2d96a73b45e7b06eff24550542cb010008c41
* | | Perform validation of shared library attributesPedro Loureiro2021-11-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perform consistency checks as per http://go/updatable-shared-libraries These include: * no attribute can specified can be less than T * max-device-sdk can't be less than min-device-sdk * min and max-device-sdk need to be at least the module's min_sdk_version * using on-bootclasspath-before implies that the module's min_sdk_version is at least T or the library has min-device-sdk of at least T Test: m nothing Bug: 191978330 Change-Id: Iaca5cf23fb0bc7e65effb3529c8e829560894c2e Merged-In: Iaca5cf23fb0bc7e65effb3529c8e829560894c2e (cherry picked from commit f9e584dd20068334f7ab44c8a989fc1b177e3886)
* | | Add support for new permissions library tag attributesPedro Loureiro2021-11-241-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | We are expanding PackageManager's supported attributes and this change enables the developer to define them in the .bp file. Test: m nothing Bug: 191978330 Change-Id: I01d579190fb585662086a7fc456f3b33cb89fb57 Merged-In: I01d579190fb585662086a7fc456f3b33cb89fb57 (cherry picked from commit 826863c8e0844b2172fde38ccdcc0d83aa2ae7e5)
* | Merge "Respect `required` property of apex modules"Treehugger Robot2021-11-051-0/+40
|\ \
| * | Respect `required` property of apex modulesJiyong Park2021-10-281-0/+40
| |/ | | | | | | | | | | | | | | | | This CL fixes a bug that `required` property of apex modules is not reflected to the generated Android.mk file. Bug: N/A Test: m nothing Change-Id: I36ccf538882f083f9433bd3eb05b3a5127f3822b
* / apex.custom_sign_tool propertyJooyung Han2021-10-271-0/+22
|/ | | | | | | | | | | A new property indicates a CLI tool to sign the APEX contents. The value is stored in apexkeys.txt so that releasetool (sign_target_files_apks) can use it to invoke the tool to re-sign the apex contents. Bug: 193504286 Test: m out/soong/apexkeys.txt com.android.virt.apex line has sign_tool value Change-Id: Ifd472049b75b5b87c1ed320f5e1190ff65ed54f2
* Merge "Remove `use_apex_name_macro`"Jiyong Park2021-10-141-30/+0
|\
| * Remove `use_apex_name_macro`Jiyong Park2021-10-141-30/+0
| | | | | | | | | | | | | | | | The property is no longer used. Bug: 161926892 Test: m Change-Id: I98948152d6d09bde2eeba4875c7ca01531a24930
* | Add more tests for dexpreopting.Jiakai Zhang2021-10-121-0/+69
|/ | | | | | | | | This CL adds more tests to ensure that dexpreopted files are generated and APEXes depends on them. Bug: 201371822 Test: m nothing Change-Id: I407ad54c55cbca9ef78bbd335e95d4b765e174a0
* Retry: Separate hidden API flags needed in sdk snapshots for S and T am: ↵Paul Duffin2021-10-051-12/+18
|\ | | | | | | | | | | | | | | 191be3a186 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844294 Change-Id: Id8977b8160f175b736214428cae94ea27f95675b
| * Retry: Separate hidden API flags needed in sdk snapshots for S and TPaul Duffin2021-10-051-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous change that was reverted: https://r.android.com/1835222 An additional test was added that revealed a bug in the previous change which has been fixed here. Previously, the behavior of the stub_flags and all_flags properties was different between S and T. In S they contained paths for the complete set of stub flags and all the encoded flags. However, in T they contained filtered sets of flags which if used in S would prevent build checks from detecting possible inconsistencies. Also, a new signature_patterns property was added in T that is not supported in S. This change creates separate properties/files for T and reverts the behavior of the properties/files that were added in S back to how they behaved in S. The new properties are called filtered_stub_flags and filtered_flags. The S and T properties are tagged with the appropriate supported_build_releases tag to ensure that they are only output when specifically targeted. Bug: 197842263 Test: m nothing Change-Id: I1ce0a3d6623dabf73e32af1a7457b9b444fc3b7c
* | Merge changes from topic "bb_201948713" am: 8bb9c6a1d9Salmax Chang2021-10-041-18/+12
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844137 Change-Id: Ia042b5b24141be4ebfa17ab15adf34c3af632635
| * Revert "Separate hidden API flags needed in sdk snapshots for S and T"Salmax Chang2021-10-041-18/+12
| | | | | | | | | | | | | | | | This reverts commit ba68c936305eeec354ad62192173a147eb3e6348. Reason for revert: suspect to cause build break in b/201948713 Change-Id: Ide3693ac1f8e24bd2f7c12857361885cb6b787ef
* | Merge "Separate hidden API flags needed in sdk snapshots for S and T" am: ↵Paul Duffin2021-10-021-12/+18
|\| | | | | | | | | | | | | | | 6b383e9ef2 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1835222 Change-Id: I092500dc977cc482a6c662ae9fcd4e71fea32810
| * Separate hidden API flags needed in sdk snapshots for S and TPaul Duffin2021-10-011-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the behavior of the stub_flags and all_flags properties was different between S and T. In S they contained paths for the complete set of stub flags and all the encoded flags. However, in T they contained filtered sets of flags which if used in S would prevent build checks from detecting possible inconsistencies. Also, a new signature_patterns property was added in T that is not supported in S. This change creates separate properties/files for T and reverts the behavior of the properties/files that were added in S back to how they behaved in S. The new properties are called filtered_stub_flags and filtered_flags. The S and T properties are tagged with the appropriate supported_build_releases tag to ensure that they are only output when specifically targeted. Bug: 197842263 Test: m nothing Change-Id: Iec8b9c539796c507245b69c0aed980fde6d8694f
* | Merge changes I957f3df8,I68986dcc am: cf6bf37d04Martin Stjernholm2021-09-241-2/+8
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1829372 Change-Id: Ifcf471f2746c1037b83c2a11b8f5120b86fd6cb2
| * Consolidate the code to resolve a deapexer module dependency.Martin Stjernholm2021-09-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | It will get more logic in upcoming CLs. Add a property to DeapexerInfo for the APEX name, for use in error messages. Test: m nothing Bug: 192006406 Change-Id: I957f3df8b34543a38cde38768dac93e78132d672
| * Propagate the dex jar path as an OptionalPath which is either valid orMartin Stjernholm2021-09-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invalid with a message. This will allow propagating any error from the deapexer module for prebuilt APEXes to the location where the dex jars get used. It's only at those points that we can raise errors about not being able to extract files from the deapexer modules if they are invalid, and this way we avoid encoding knowledge there about why they may be invalid. To keep the refactoring limited it intentionally does not change any of the existing logic for when dexJarFiles are set or not (non-nil vs nil prior to this change), although there may be opportunity to use this for more conditions when dex jars aren't available. The refactoring is also not extended to dexpreopt.ClassLoaderContextMap. Test: m nothing Bug: 192006406 Change-Id: I68986dccd9a9b3fee4d24caa1947ea17a36caedc
* | Merge "Add test to TestJavaStableSdkVersion for legacy core platform" am: ↵Treehugger Robot2021-09-201-4/+39
|\| | | | | | | | | | | | | | | 3769a27c5e Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655611 Change-Id: I752f24a2e6b9763019866402a8af6adb3e96ee2a
| * Add test to TestJavaStableSdkVersion for legacy core platformPaul Duffin2021-09-161-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds a test case to TestJavaStableSdkVersion for the case where a module uses sdk_version: "core_platform" but is in the list of modules that can use the legacy version. This required storing the lookup map in the Config to allow it to be customized for the test. Bug: 180399951 Test: m nothing Change-Id: I404705c3fd8a559649c6ab2624856cf78f49f85c
* | Merge "Share cFlags, tidyFlags, etc. in a module" am: b1a12462a9Treehugger Robot2021-09-161-2/+10
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824024 Change-Id: Iaf6050178f9d172a5a17103504e8f081277df9cf
| * Share cFlags, tidyFlags, etc. in a moduleChih-Hung Hsieh2021-09-151-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * In builder.go, share common flags in a module. * This replaces the sharing of cflags/cppflags/asflags in cc.go. * A unit test in apex_test.go now fails and is commented out. It is a failing test hidden by old optimization in cc.go. * In module.go, expand the reference variable $someflags<n>, or ${someflags<n>} to keep many existing unit tests work as is. * The build.ninja size was reduced from 8.1GB to 6.2GB, for aosp_arm64-eng WITH_TIDY=1 USE_RBE=true, and from 7.5GB to 5.6GB when USE_RBE is 0. Content of build.ninja is also more readable and searchable. Read/write build.ninja times are also reduced, depending on disk I/O speed. Test: make WITH_TIDY=1 Change-Id: I17f96adf4844136d52e5d40f57a19d9e290162b7
* | Merge "Relax restriction on suffix of apex_set filename to include .capex" ↵Mohammad Islam2021-09-091-0/+29
|\| | | | | | | | | | | | | | | am: 385cde82d4 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821656 Change-Id: I91189bd060d0c365892234daab5a59b70a8018c7
| * Relax restriction on suffix of apex_set filename to include .capexSamiul Islam2021-09-081-0/+29
| | | | | | | | | | | | | | | | | | | | Compressed APEX files generated by the build system have the .capex extension. This CL allows us using those .capex files with their actual suffix. Bug: 197258691 Test: manual + unit test added Change-Id: I79173ef942326b48b5e659f1873d80f12b212339
* | Merge "Allows prebuilts in override_apex." am: e267bc8f74Treehugger Robot2021-09-031-0/+15
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1811097 Change-Id: I732915686e54509c30f6855ea29d562bc83cf680
| * Merge "Allows prebuilts in override_apex."Treehugger Robot2021-09-031-0/+15
| |\
| | * Allows prebuilts in override_apex.Daniel Norman2021-09-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 197787336 Test: Create an override_apex that uses a different `prebuilts` than its base. Observe built contents. Test: apex_test.go Change-Id: I7666ed6cfe3f2fa5dd81e5f8c1961477dabbbd3c
* | | Merge "Skip dexbootjar check using AllowMissingDependencies flag" am: b7e5985fd5Spandan Das2021-08-311-0/+6
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1803934 Change-Id: I55ae4c5858330385876eb42e0fa16773ca748150
| * | Merge "Skip dexbootjar check using AllowMissingDependencies flag"Spandan Das2021-08-311-0/+6
| |\ \ | | |/ | |/|
| | * Skip dexbootjar check using AllowMissingDependencies flagSpandan Das2021-08-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soong checks that every module part of a bootclass_fragment provides a dex boot jar file, even if the module is not a dependency of vendor.img Using AllowMissingDepdencies() to skip this check allows vendors to be more aggressive in removing projects from their source tree Test: In build/soong, run go test ./... Test: m nothing Bug: 196306898 Bug: 192616764 Change-Id: I78b062afdc19a6a3251aa8552230f3fcf334b6fb
* | | Merge "Rename BuildDir and NinjaBuildDir." am: 5602d33025Lukács T. Berki2021-08-271-1/+1
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1810356 Change-Id: I6af3316fb122af7a05b71de7f9cd371746bb5f21
| * | Rename BuildDir and NinjaBuildDir.Lukacs T. Berki2021-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are just out/ and out/soong/ and the old names were quite confusing. Test: Presubmits. Merged-In: I999ca62162062f27e449f83ffb00fa580d4065b8 Merged-In: I2fcd80a9e376a6842a06aa104a9f6f5c5e16f8c7 Change-Id: Ib481d2aac40df8da1b74174dc8ec576c1cb48be0
* | | Merge "Make bpfs properties overridable" am: 60dc5c0db2Treehugger Robot2021-08-271-0/+17
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1810456 Change-Id: Ib8196d660983d724e4ecde5c08a9ab2da979df99
| * | Merge "Make bpfs properties overridable"Treehugger Robot2021-08-271-0/+17
| |\ \
| | * | Make bpfs properties overridablemarkchien2021-08-271-0/+17
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | To support different variable bpfs file between mainline module and non-updatable module(e.g. Android GO). Make bpfs properties overridable. Test: m Bug: 190523685 Change-Id: I4c63e35f74230de94b21f3ceb2beb90f0f9ddb11
* | | Merge changes I15328e0b,I731227c2 am: 19312d4224Jiyong Park2021-08-251-0/+39
|\| | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1808218 Change-Id: I58224f0fc056f174567241a13d9eb54dbaef5d12
| * | crt objects for APEX and vendor variants have correct target API levelsJiyong Park2021-08-251-0/+39
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, crt objects for APEX and vendor variants targetted API level 16 regardless of their context. For example, even if BOARD_VNDK_VERSION is set to 29, or an APEX has `min_sdk_version: "29"`, the target API level was from `min_sdk_version` property of the crt object which is set to 16. The meaning of min_sdk_version is quite different when it comes to crt objects. It means the lowest API level that it CAN target for. It does NOT mean the API level it SHOULD always target. This has caused some other problems like TLS segment underalignment for vendor libraries because the vendor libraries were all built with TLS layout from API level 16. This change fixes the problem by correctly implementing the different semantic of min_sdk_version for crt objects. Bug: N/A Test: m nothing Change-Id: I15328e0b6cbabbe151dd65c7469c6355e167b78a
* | Merge "Fix tests to use correct fixtures for configuring (Apex)BootJars." ↵satayev2021-08-111-13/+55
|\| | | | | | | | | | | | | | | am: 721f42d12a am: 9958b36643 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1787998 Change-Id: Id9248b6b54547e55c28bb386c867294ec20df873
| * Fix tests to use correct fixtures for configuring (Apex)BootJars.satayev2021-08-101-13/+55
| | | | | | | | | | | | | | | | | | | | This is in preparation to r.android.com/1740313 where setting correct variables would be enforced (i.e. apex and non-apex boot jars must be in config.ApexBootJars and config.BootJars correspondingly). Bug: 191369843 Test: m nothing Change-Id: Ic86680c1f7af53d229083b2cc58beb3ceccb4b6a
* | Merge changes Ie2012adb,Ib0283ca6 am: 03beb0ec77 am: 47992dd860Treehugger Robot2021-08-041-3/+51
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1784476 Change-Id: I7e41072eaf3e953591232b6bb8df6a7c1b961c2a