Commit graph

773 commits

Author SHA1 Message Date
Ziwei Zhang
a8de90ce4c Merge "Generate 2.0 config for Mobly test." into main 2024-02-07 07:38:39 +00:00
Kiyoung Kim
454265c233 Reapply "Rename LOCAL_USE_VNDK"
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I2da2e2027ccabbcfbb444abc6828addeb3b22e13
2024-02-05 11:01:41 +09:00
Ziwei Zhang
614a5aea0e Generate 2.0 config for Mobly test.
- Add `v2` suffix for ATS 2.0 config.
- Update the mobly test config template.

Test: m CtsBluetoothMultiDevicesTestCases (with `runner = "mobly"`)
Bug: 299850687
Change-Id: Ic95ecb760989818291f0746054e4f68d12359a9f
2024-02-04 03:18:52 +00:00
Kiyoung Kim
0bf6c284e0 Revert "Rename LOCAL_USE_VNDK"
Revert submission 2931430-local_use_vndk

Reason for revert: build fails with barbet targets

Reverted changes: /q/submissionid:2931430-local_use_vndk

Change-Id: I40277cfb26bb4da5dc398b99fc4ab009d91405fc
2024-02-02 08:06:57 +00:00
Kiyoung Kim
f4c9330e24 Rename LOCAL_USE_VNDK
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: Icfd1707953eba2e29044468ab6728b39d7998048
2024-01-30 17:10:39 +09:00
Inseob Kim
7b06c6918e Remove LOCAL_FILE_CONTEXTS
It's not used anymore.

Bug: N/A
Test: TH
Change-Id: Ib61922add91ad07e2c28b0950117470e5435ab34
2024-01-18 12:33:02 +09:00
Colin Cross
3b89c6532a Support Soong-generated module-info.json entries
Allow Soong modules to generate their own module-info.json entries
by merging Soong's module-info.json file into the one generated in
Make.

Skip collecting unnecessary ALL_MODULES.$(my_register_name).*
that are only used for module-info.json if the module was already
handled by Soong via the LOCAL_SOONG_MODULE_INFO_JSON property.

Bug: 309006256
Test: Compare module-info.json
Change-Id: I2c9db3c7c7bae7bd6cb889d7ebc2e383c278c82d
2024-01-02 17:21:22 -08:00
Colin Cross
710c3cb5fb Remove code related to unused LOCAL_* variables
LOCAL_JETIFIER_ENABLED, LOCAL_NO_PIC, LOCAL_PREBUILT_STRIP_COMMENTS,
LOCAL_RMTYPEDEFS, and *.vts sources are never used.  Remove them
and the code related to them.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I2ca9e674602057cc163b8bc28b0c57a0b7cc4361
2023-11-02 10:45:33 -07:00
Colin Cross
fda3c6a36a Delete unused variables from clear_vars.mk
Kati analysis in AOSP spends around 6 seconds in clear_vars.mk.
Delete any variables in clear_vars.mk that are not referenced anywhere
else in build/make/core.

Test: no change to build-aosp_cf_x86_64_phone.ninja
Change-Id: I7e0db3c02d297de825acbfbd1a0f05724d1e846d
2023-11-02 10:33:25 -07:00
Colin Cross
1b7f072505 Remove obsolete ide.mk and related code
The code to generate an eclipse classpath is obsolete, remove it and
related code.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I7e1b6268b98ecbb7be88db8945dd7b30acc695ba
2023-11-02 10:16:57 -07:00
Jooyung Han
8b162283f7 Rewrite how to generate apexkeys.txt
Instead of listing all apexes in the source tree, now each apex emits
its own fragment for apexkeys.txt, which is pointed by
LOCAL_APEX_KEYS_FILE. Makefile collects apexkeys.txt from installed apex
files. This is to avoid listing unrelated apexes (not installed,
testdata, unexported namespaces, etc.)

Bug: 304914238
Test: m apexkeys.txt
Test: m blueprint-tests
Change-Id: I6b5601609d16452a0717f09ecaa703ee09693094
2023-11-01 13:06:08 +09:00
Treehugger Robot
08d991834d Merge "Support transitive resource packages from Soong" into main 2023-07-26 00:34:57 +00:00
Colin Cross
d9d5c2a95e Support transitive resource packages from Soong
Soong is improving resource handling by not squashing resources from
all dependencies into every android_library.  This causes problems
when the android_library is exported to Make, as Make is still using
the old squashing behavior.

Add a file to every static java library that lists the resource packages
of its transitive dependencies.  For modules defined in Andorid.mk files
leave the file empty, but for Soong modules populate it with the list
of transtiive dependencies.  Pass the contents all of the files from
direct dependencies to aapt2 link to include any transitive dependencies.

Bug: 284023594
Test: m Dialer
Change-Id: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
Merged-In: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
2023-07-25 21:30:38 +00:00
Joe Onorato
63a84551ca Combine aconfig cache files into per-partition dumps.
Bug: 283910439
Test: manual validation of outputs, soong unit tests
Change-Id: I5f7dc16ee42c3722dc66ffe964ed20479eea1e15
2023-07-07 17:33:09 -07:00
Ludvig Hansson
6d11991f1d Clean additional Robolectric variable
Add LOCAL_INSTRUMENT_SRCJARS to list of variables
to reset when calling CLEAR_VARS from a makefile.

This fixes an issue when generating JaCoCo coverage
reports for Robolectric tests.
The value from another module would bleed into the current
one causing the wrong source directory to be used during
report creation, which in turn resulted in an empty report.

This would only happen for modules still using 'Android.mk';
when using Android.bp files the value for LOCAL_INSTRUMENT_SRCJARS
is always set from 'robolectric.go'.

Bug: 214588476
Test: m clockwork-frameworks-robotests-jacoco
Change-Id: I7b527c82bdbe4db06acd1a1fa1a2443e64ed703d
(cherry picked from commit cc799bdf9161dc3c0f6eb437ed064f9712bbfd6b)
2023-03-17 23:55:29 +00:00
Wei Li
499333616c Generate SBOM of the target product in file sbom.spdx.json in product out directory.
Original aosp/2374663 was reverted, so this change cnotains the implementation but disabled by default and SBOM will not be built by default with "m dist".

The feature will be enabled later in small CLs after running tests successfully in forrest.

Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: I926d0f97f3a0330ef61d059f12ea660005d370e6
2023-03-14 15:14:06 -07:00
Cole Faust
6a75c4f782 Delete java-layers.py
There are no usages of LOCAL_JAVA_LAYERS_FILE,
and java-layers.py was written in python 2.

Bug: 203436762
Test: Presubmits
Change-Id: I1be0f2547757a853e20811f28529479487037e94
2022-10-24 18:15:54 -07:00
Zhenhuang Wang
415ee12c76 Export test_options.tags to module-info
The test_options.tags attribute modifies execution behavior when running
tests in ATest Bazel mode. Exporting the value to module-info enables
ATest to add them to the corresponding Bazel target.

Bug: 240928948
Test: manually add `test_options.tags` attribute and run:
    $ refreshmod && \
      cat out/target/product/generic/module-info.json |\
      grep <tags>
Change-Id: I1a70d5c66703ed6a5a250459a80e8bca71d659b6
2022-08-22 20:59:54 +08:00
Bob Badour
42f00c7b61 Test suite notices using dependencies.
Switch from combine-notice-files to html-notice-rule and
text-notice-rule.

Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m cts reportmissinglicenses
Change-Id: I59d78553f15f0fd6be87228c933693b63e2ebf04
2022-03-23 11:18:39 -07:00
yangbill
e6b498bf2d Add data_bins to data_dependencies in module-info
This change exports the list of test_data_bins as data dependencies
that are required by modules when running the test.

Bug: 215234071
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ie5c1ef70055618a5fa0ba1bcfbcba8054743d41a
2022-02-17 05:17:03 +00:00
yangbill
fa5026c4d8 Export runtime dependencies in module-info
This change exports the list of dependencies that are required by
modules at runtime. Note that only the host case is currently
handled.

Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I05199c54da311e59c7ea87595397ee4eecfab6a3
2022-02-10 08:07:13 +00:00
yangbill
10adf32047 Add missing LOCAL_ROTATION_MIN_SDK_VERSION
This definition missing will cause merge conflict which is already in
main branch.

Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ifc103268aad9d6769822ff1eae4db1cc59aee57e
Merged-In: I3b5e9bb3985c2ae83381499a44b339a7b1deb05c
2022-02-10 08:05:06 +00:00
Colin Cross
71d9919322 Revert^2 "Reuse license metadata files from Soong"
81b167693f

Change-Id: Iff45cffb1f2b9d01cec70d96e34f46d35bb37842
2021-12-10 23:05:02 +00:00
Colin Cross
81b167693f Revert "Reuse license metadata files from Soong"
Revert "Escape Host*Variable contents"

Revert submission 1899703

Reason for revert: b/210158272
Reverted Changes:
I142c19284:Reuse license metadata files from Soong
Ife89b8f23:Add dependency license annotations
I8e7410837:Build license metadata files in Soong

Change-Id: Id9d66c01453aebe8a52eaa6628e9933a990d4c2f
2021-12-10 23:03:08 +00:00
Colin Cross
4f8dd6fe45 Reuse license metadata files from Soong
Copy the license metadata files from Soong if they've already
been built.

Bug: 207445310
Test: m checkbuild
Change-Id: I142c192843e94b018079809bd596ff81136b2de3
2021-12-03 22:47:11 +00:00
Bob Badour
879cfa867d Add macros for non-module license metadata and deps
Gets rid of .meta_module files and instead defers emitting rules until
after all the non-module targets have been processed. Allows direct
dependency on .meta_lic files, which in turn depend on license text
files.

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m reportmissinglicenses

Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
2021-11-03 00:52:25 +00:00
Colin Cross
23ee375a4a Support generating install rules in Soong
Support moving some install rules into Soong by allowing Soong to
provide a Makefile containing install rules, and by skipping parts
of base_rules.mk when Soong already created an install rule.

The install rules are exported as a Makefile instead of directly
in Soong's build.ninja file so that base_rules.mk can add dependencies
from the `required` property that are hard to resolve in Soong.

Bug: 204136549
Test: m checkbuild
Change-Id: Ife2964d76469b385e90c0c5f6adf21bd2b5e8bf6
2021-10-29 15:43:39 -07:00
Colin Cross
f4017412e2 Support per-testcase directories in all test suites
There are cases where two modules try to install the same test data
into CTS, which results in collisions when CTS puts the data for all
tests in the same directory.  Add a flag that allows enabling a
per-testcase directory for an individual test for all test suites.

Bug: 193168159
Test: cts-tradefed run commandAndExit CtsBionicTestCases
Change-Id: I4bfaaedfe0e6b8df9c75125b3e2762a4f0d5b395
2021-09-24 16:58:03 -07:00
Yuntao Xu
32a085c041 add LOCAL_DISABLE_TEST_CONFIG logic
Disable the generation of .config file when the variable
LOCAL_DISABLE_TEST_CONFIG is true.

Bug: 188927912
Test: rum 'm module-name' (`android_test_helper_app` type module)
Test: TreeHugger
Change-Id: I64372b4ba84fcf1af937abdee345ceb1d3c2f6c5
2021-05-27 10:19:48 -07:00
Liz Kammer
5b6f5a7bcc Add LOCAL_FULL_VINTF_FRAGMENTS to handle full path
Soong supports references to other modules for vintf_fragments property,
so full paths need to be passed from Soong to make rather than module
local paths.

Test: m droid
Bug: 184567830
Change-Id: Ia7f1cf977de8aeb08d41624277ff6231198222e5
2021-04-16 16:40:59 -04:00
Liz Kammer
5f2d88bee8 Merge "Add LOCAL_FULL_INIT_RC to handle init_rc full path" 2021-04-12 19:05:27 +00:00
Liz Kammer
382be36c43 Add LOCAL_FULL_INIT_RC to handle init_rc full path
Soong supports references to other modules for init_rc property, so full
paths need to be passed from Soong to make rather than module local
paths.

Test: m droid dist
Bug: 184567830
Change-Id: Ib1873a3418830f5cbf32e26f55d3ad0ab0d9c9c5
2021-04-08 11:33:46 -04:00
Stephen Hines
d49aa55cf1 Remove all unused, legacy FDO build rules
There are no current users of this feature. All remaining references are
legacy scripts that aren't actually in-use today.

https://source.corp.google.com/search?q=BUILD_FDO_INSTRUMENT%20-file:build%2F
https://source.corp.google.com/search?q=LOCAL_FDO&ct=os&sq=package:%5Eandroid$

Test: build
Change-Id: I86ff6531a0868fb8e30741f0d04de1739fba4586
2021-04-05 17:13:00 -07:00
Ulya Trafimovich
558cb6c5ac Merge <uses-library> dependency configs into dexpreopt.config files.
Since Make does not visit modules in topological order of their
<uses-library> dependencies, information from dependencies to the
dexpreopted module has to be passed via dexpreopt.config files. A build
rule for a dexpreopt.config file depends on dexpreopt.config files for
<uses-library> dependencies, and dex_preopt_config_merger.py script
extracts the necessary information from dependency configs and patches
the module's config.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id0b71170a4d2ab1d33059de0e9ad9d7e61f2345e
2021-01-28 14:59:14 +00:00
Ulya Trafimovich
514d809b20 Add LOCAL_PROVIDES_USES_LIBRARY and use it in module dexpreopt config.
The new variable stores the name of the <uses-library>, if for some
reason it is different than the name of the module for that library
(normally they are the same, but sometimes differ). If the variable is
undefined or defined to an empty string, the name of the <uses-library>
is considered to be the same as the name of its module. It is recorded
in a module's dexpreopt.config file as "ProvidesUsesLibrary" field.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Iac1be0fac79a944e4c26867cc58e274b76709da8
2021-01-22 12:09:30 +00:00
Bob Badour
21bd34fe09 Revert^2 "Add variables for notice deps, license kinds etc."
dcfb9c5ef5

Change-Id: I6a60f55ab0e7013061a695cb1b7c5ffde29577dd
2021-01-06 20:46:49 -08:00
Jerome Gaillard
dcfb9c5ef5 Revert "Add variables for notice deps, license kinds etc."
Revert "Export soong license data to make."

Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
2021-01-06 19:00:05 +00:00
Bob Badour
6421674a39 Add variables for notice deps, license kinds etc.
Change-Id: Ib8e538bd09044a5791083b362d807cd9293833d5
2021-01-05 08:42:48 -08:00
Dan Shi
15d3f8f697 Clear LOCAL_IS_UNIT_TEST
Bug: 172006742
Test: none
Change-Id: I15c4f5b97bea9e3562766a3fbd3a8058ce042bd4
2020-11-18 15:37:01 -08:00
Anton Hansson
351a317cd5 Remove apidiff task and droiddoc jdiff support
Nothing uses these anymore.

Bug: 158465496
Test: m
Change-Id: Iaef4f7ca7e5d21b1850d7491247f13782c9bb23a
2020-10-08 19:06:21 +01:00
Jooyung Han
b27c2e8af9 Use file_contexts for flattened apexes
Because flattened apexes are installed in /<partition>/apex, associated
file_contexts file should be modified to accommodate path changes and
also merged into target-wide file_contexts.bin file.

Soong now emits modified file_contexts via LOCAL_FILE_CONTEXTS, and
these files are collected into a temporary file_contexts.modules.tmp
file, which is used as an additional input of file_contexts.bin.

Bug: 166518492
Test: m file_contexts.bin
      check the contents of file_contexts.concat.tmp file
Change-Id: I002a2294af9e06baeaf54bc5a9a5380d23b8a3da
2020-09-23 15:43:58 +00:00
kellyhung
0ba6ec6f49 Add test_mainline_modules option support in mk
Bug: 165425972
Test: Apply aosp/1418212
      atest -b hello_world_test
      Check module-info.json for hello_world_test HelloWorldTests and
HelloWorldHostTest

Change-Id: Ie30a09a54b0ae927ca4d8d1aaba2ac0cdb15233a
2020-09-03 02:37:44 +00:00
Treehugger Robot
67c930a320 Merge "Add extra_test_configs option support in mk" 2020-08-21 16:22:42 +00:00
Dan Shi
0c9a525b98 Add extra_test_configs option support in mk
Bug: 163344047
Test: m -j HelloWorldHostTest hello_world_test HelloWorldTests
Change-Id: Ie63c2a80e01984ac9941d0bad4ad7948e0bb8ac0
2020-08-19 21:22:50 -07:00
Colin Cross
a9b9e6e5ff Merged and dist lists of unused methods from R8
Merge all the proguard_usage.zip files produced by the R8 rules and
dist the result.

Bug: 151857441
Test: m TARGET_BUILD_APPS=DocumentsUI dist
Change-Id: I7e6d73241478016093a203dc7bd86407ab86a4ac
2020-08-17 19:31:22 +00:00
Pirama Arumuga Nainar
1ac5384aaf [config_sanitizers] Fail if LOCAL_SANITIZE_BLACKLIST is used.
All uses of this property have been migrated to
LOCAL_SANITIZE_BLOCKLIST.

Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Bug: 162245450

Test: Add the old property to an Android.mk and ensure error is thrown.
Change-Id: I797ff651f03b954b410f76f4d201a962ded717df
2020-08-11 11:00:53 -07:00
Treehugger Robot
bf0c1b7b77 Merge "Update language to comply with inclusive guidance" 2020-07-31 22:50:49 +00:00
Pirama Arumuga Nainar
565583382d [config_sanitizers] Support LOCAL_SANITIZE_BLOCKLIST
It'll replace LOCAL_SANITIZE_BLACKLIST.

Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Bug: 162245450

Test: n/a  (no users in AOSP for this property).
Change-Id: Ie31c35af722d05011a528e1170b0c026b50fbf88
2020-07-30 15:31:22 -07:00
Liz Kammer
9dd20038b2 Update language to comply with inclusive guidance
Update android_app_set make files to use INSTALL rather than MASTER for
android_app_sets, this better matches the wording used for apex_set.

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: m nothing
Change-Id: I7f37a72914f4b18a839942cc3db98b1c57db921e
2020-07-28 15:59:38 -07:00
Colin Cross
d56abedb02 Merge "Dist lint reports for apps" 2020-07-16 23:06:22 +00:00