Commit Graph

7952 Commits

Author SHA1 Message Date
Ronald Braunstein
cc9a065331 Merge "Add test-only and test-target fields to all_teams proto." into main am: 98d46751ef am: 1f34b78590
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3022586

Change-Id: I0d3215c08be061b3e4d4baa2aebf8818e4cdc14a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 01:30:37 +00:00
Ronald Braunstein
1f34b78590 Merge "Add test-only and test-target fields to all_teams proto." into main am: 98d46751ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3022586

Change-Id: Ic9171a03f07493ab3026dec6060b0d7fda13ff40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 01:12:17 +00:00
Ronald Braunstein
c560309e30 Add test-only and test-target fields to all_teams proto.
The `test-only` flag designates the module contains test-only, not
production code.  In order to generate code-coverage reports, we wanted
a way to filter out code (like java_library) that is test-only and
doesn't need to be in the report.
   The XXX_test modules will have test-only set automatically.
   For modules like `java_library`, users will be a able to set this in
   the Android.bp file.
   As a follow-up, I'll run some queries to find modules that are only
   reachable from top level test targets and mark them test-only as
   appropriate.

`test-only` is being added to the team.proto and will be written via the
`all_teams` target.

Currently, it is challenging to find "all top level test targets".
I'm adding another field to mark the target as a "top level test
target" if it is a XXX_test or XXX_test_host module.  The goal is to
mark all modules the user intended to run as a test, either with
tradefed or directly as a native test.

I added 'module-type/kind' to the proto so I can do some queries:

 gqui from  "flatten(out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.top_level_target = true group by teams.kind'
+--------------+----------+
|  teams.kind  | count(*) |
+--------------+----------+
| android_test |     1379 |
| art_cc_test  |       56 |
| cc_benchmark |       68 |
| cc_fuzz      |      515 |
| cc_test      |     3519 |
| cc_test_host |        6 |
| java_fuzz    |        5 |
| java_test    |      773 |
+--------------+----------+

% gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind ,count(*) where teams.test_only = true group by teams.kind'
+--------------------------+----------+
|        teams.kind        | count(*) |
+--------------------------+----------+
| android_test             |     1379 |
| android_test_helper_app  |     1678 |
| art_cc_test              |       56 |
| art_cc_test_library      |       13 |
| cc_benchmark             |       68 |
| cc_fuzz                  |      515 |
| cc_test                  |     3519 |
| cc_test_host             |        6 |
| cc_test_library          |      484 |
| java_library             |        2 |
| java_test                |      773 |
| java_test_helper_library |       29 |
+--------------------------+----------+

All modules can be seen here: https://docs.google.com/spreadsheets/d/1Zqbh7lDDdlI1xVmrN9fZ8bm8XD7EoORjjiPqbMvAKgQ/edit#gid=396553017

FOLLOW UP cls:
  *) Add more top level tests, like sh_test and python_test
  *) Add validation so that only modules currently marked test-only
     can depend on modules marked test-only
  *) Remove test_spec, code_metadata, TestModuleProviderKey: aosp/2928500

Test: go test ./java ./cc ./android
Test: m blueprint_tests
Test: m nothing --no-skip-soong-tests
    !!  android already failing on selects_test
Test: m all_teams  && gqui from  "flatten(out/soong/ownership/all_teams.pb, teams)"

Change-Id: Ib97dca60989aa9d7f000727c92af2e354926f072
2024-04-09 16:36:29 -07:00
Cole Faust
6aaa55d11a Remove "exported" ninja variables am: 8982b1c49e am: 50b1f9bd53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3031205

Change-Id: Ib94fb0c07106eb2ae52e3f317c44656fddb9aab3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 20:07:31 +00:00
Cole Faust
50b1f9bd53 Remove "exported" ninja variables am: 8982b1c49e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3031205

Change-Id: Id9a465d5a056cdac16c1ba6f3b5596fdabfe0073
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 19:42:40 +00:00
Cole Faust
8982b1c49e Remove "exported" ninja variables
There was infrastructure to export ninja variables to bazel. Now that
the bazel migration is cancelled, we don't need it anymore.

Bug: 315353489
Test: m nothing
Change-Id: I298cc2ac7ebd004557be3b30d75f7357cab0b7a0
2024-04-09 09:42:37 -07:00
Treehugger Robot
1d425a68cc Merge "fix: required property doesn't track deps to java, apex, ..." into main am: ccd5b5545b am: 834a4f7c9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3029144

Change-Id: I3ef6f04f32b431309cbc2f76aa163c0eb4b001aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 03:48:49 +00:00
Treehugger Robot
834a4f7c9f Merge "fix: required property doesn't track deps to java, apex, ..." into main am: ccd5b5545b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3029144

Change-Id: I0536092ec1b30d0d54cb69f6d226b9d4ff380c93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 03:29:40 +00:00
Treehugger Robot
ccd5b5545b Merge "fix: required property doesn't track deps to java, apex, ..." into main 2024-04-09 03:12:39 +00:00
Cole Faust
db705aaa91 Merge changes from topics "replace_instead_of_append", "selects_get_and_get_default" into main am: 42a8b256af am: 394158399e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028124

Change-Id: I9816cc1ab8a2f549de44596ce71dea8f827ee552
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:33:50 +00:00
Cole Faust
cb0a2f59a9 Add tests for android:replace_instead_of_append am: 02dd6e5640 am: 54d24cff2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3026026

Change-Id: I47f84723430905ab1e1692524aa3d8c3effd0f76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:33:46 +00:00
Cole Faust
394158399e Merge changes from topics "replace_instead_of_append", "selects_get_and_get_default" into main am: 42a8b256af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028124

Change-Id: I55d6028ecc3667791d5eb8cde76c3a84706475d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:16:17 +00:00
Cole Faust
54d24cff2c Add tests for android:replace_instead_of_append am: 02dd6e5640
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3026026

Change-Id: Iee736e2738d770cbfaabc2459dc74cda2f29c511
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:16:13 +00:00
Cole Faust
42a8b256af Merge changes from topics "replace_instead_of_append", "selects_get_and_get_default" into main
* changes:
  Rename Evaluate() to Get() and add GetDefault()
  Add tests for android:replace_instead_of_append
2024-04-08 20:45:55 +00:00
Treehugger Robot
8418f7c60a Merge "Remove Device VNDK version usage from Soong" into main am: ed2adb879f am: 8a57bcba2f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3027063

Change-Id: Iee85ae97d1d4337aec6589f5adb30f23e6adc153
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 20:08:28 +00:00
Treehugger Robot
8a57bcba2f Merge "Remove Device VNDK version usage from Soong" into main am: ed2adb879f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3027063

Change-Id: Ib01a6ccb4e7074897d913cfb3ae47aef1cc153d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 19:47:41 +00:00
Treehugger Robot
ed2adb879f Merge "Remove Device VNDK version usage from Soong" into main 2024-04-08 19:24:36 +00:00
Jiyong Park
73e5babafe fix: required property doesn't track deps to java, apex, ...
This change fixes a bug that the required property doesn't track
dependencies to modules whose arch is common.

Bug: 321000103
Bug: 321626681
Test: go test ./...
Change-Id: I3d2b3ad8cb2a9f1c5c3d5345bf05402a787f011a
2024-04-05 15:12:16 +09:00
Kiyoung Kim
4e765b1bfc Remove Device VNDK version usage from Soong
As of VNDK deprecation, Device VNDK version should no longer be used
from build. This change removes all references on Device VNDK version
and related logic with it.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ibc290f0b41e8321f80c75c69f810223989af68dc
2024-04-05 01:57:32 +00:00
Spandan Das
ac6597d589 Merge "Reland "Use cp instead of install for ndk_headers"" into main am: 29cd82b714 am: 49df48da6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028272

Change-Id: I997da69c380f7c2c7b523c91b135d6977df06017
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-05 01:54:02 +00:00
Spandan Das
49df48da6b Merge "Reland "Use cp instead of install for ndk_headers"" into main am: 29cd82b714
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028272

Change-Id: Ie0313252067fcdbe7f712863ecb27ddd0f72ce6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-05 01:41:24 +00:00
Spandan Das
29cd82b714 Merge "Reland "Use cp instead of install for ndk_headers"" into main 2024-04-05 01:25:05 +00:00
Spandan Das
f280b23fe5 Reland "Use cp instead of install for ndk_headers"
This relands aosp/3026027 with fixes for ndk_library. ndk_library
uses ctx.InstallFile to copy the stubs from an intermediate dir to
out/soong/ndk/sysroot/. The copy rule was created in
out/soong/installs-<product>.mk. This would cause issues when soong_ui
is run in `--soong-only` mode

To fix this, the cp rule is created entirely in soong. The stub library
is marked uninstallable to prevent creation of duplicate rules when
`--soong-only` mode is not used

Test: presubmits
Test: lunch ndk-trunk_staging-userdebug &&
ALLOW_MISSING_DEPENDENCIES=true build/soong/soong_ui.bash --soong-only
out/soong/ndk.timestamp

Change-Id: I6f8b87d88d8ca5ec9a3327e1f11e9aa654f8cdce
2024-04-04 22:39:45 +00:00
Cole Faust
34f125fd57 Rename default select branch to 'default' keyword am: 683316a2b0 am: 3308f3d5ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3024124

Change-Id: If1a6b0ab593e0d361005d79b091d6833d8bee762
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 22:23:48 +00:00
Cole Faust
b78ce43ae3 Rename Evaluate() to Get() and add GetDefault()
Part of the design of property structs is that they were easy to access.
In keeping with that spirit, use a shorter and easier to spell name
for the getter, and add GetDefault() so that you don't need to pass
the result of Get() to one of the
proptools.StringDefault/BoolDefault/etc functions.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I0b8df151de59f2cd9463425c6666cbfda6bf47f2
2024-04-04 15:09:18 -07:00
Cole Faust
02dd6e5640 Add tests for android:replace_instead_of_append
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ideb739b3f1a6a5854453db7d51bdee73a3979fd4
2024-04-04 15:09:04 -07:00
Cole Faust
3308f3d5ab Rename default select branch to 'default' keyword am: 683316a2b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3024124

Change-Id: I5ea95b785417e77d5af4ec18e9bbeeb95d323875
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 22:04:48 +00:00
Cole Faust
b595d59777 Merge "Add tests for "unset" select statements" into main am: 767a1fe663 am: b5965ed9a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3016592

Change-Id: I2d54c6a396ce56e08217d4cf3d5a02c7b44d55c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 18:26:06 +00:00
Cole Faust
b5965ed9a5 Merge "Add tests for "unset" select statements" into main am: 767a1fe663
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3016592

Change-Id: I60298949b6e41a7abc72b1048b89cd94726354d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 18:25:18 +00:00
Spandan Das
251f487e8b Merge "Revert "Use cp instead of install for ndk_headers"" into main am: 6f591bf8fb am: b5767541d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028263

Change-Id: Id1244af5e14a341a1116a5d193067ac0ad421c81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 18:24:57 +00:00
Cole Faust
683316a2b0 Rename default select branch to 'default' keyword
Previously I was using an underscore to denote the default branch
because I was thinking that I would allow variable bindings in the
select branches, and 'default' could be mistaken for the name of a
variable. But I think it's better to just introduce alternate syntax,
like `default @ my_var: "foo" + my_var,` to do the variable bindings,
so that we can have a clearer name for the default case.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I8cbded97a029c06782fb5313d8c0e67f22951482
2024-04-04 11:24:24 -07:00
Cole Faust
767a1fe663 Merge "Add tests for "unset" select statements" into main 2024-04-04 18:21:55 +00:00
Spandan Das
c0b571c240 Merge "Use cp instead of install for ndk_headers" into main am: e5e0fb0fe5 am: 0eba0b9839
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3026027

Change-Id: I64b1c2fce2822ad2a97cacee719bb919c780c552
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 17:53:46 +00:00
Spandan Das
b00d52d523 Merge "Convert BuildIgnoreApexContritbutions variable to a boolean" into main 2024-04-04 17:50:48 +00:00
Spandan Das
6f591bf8fb Merge "Revert "Use cp instead of install for ndk_headers"" into main 2024-04-04 17:49:05 +00:00
Cole Faust
12c8ed4601 Add tests for "unset" select statements
See the blueprint cl for more information.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I3a0302f370e8e498556b219cbda70bdb0255f6ef
2024-04-04 10:41:43 -07:00
Spandan Das
c299c3f913 Revert "Use cp instead of install for ndk_headers"
This reverts commit 1202729cb2.

Reason for revert: Breaks aosp-main/ndk builds

Change-Id: I453792f7f974dc336d5f6775adfc5899b8d34d7b
2024-04-04 17:11:43 +00:00
Spandan Das
e5e0fb0fe5 Merge "Use cp instead of install for ndk_headers" into main 2024-04-04 16:39:58 +00:00
Spandan Das
1202729cb2 Use cp instead of install for ndk_headers
ndk_headers currently use ctx.Install to install headers in
out/soong/ndk/sysroot. The files are subsequently used to compile ndk
variants of cc libraries on host.

Since these headers are not actually installed on device, use android.Cp
to assemble the NDK sysroot. By itself, it should be a no-op, but
androd.Cp is more friendly with restricting the installation rules to
PRODUCT_PACKAGES.

To make it explicit that the sysroot is not a typical installation path,
this CL also modifies the type to OutputPath

Test: m
Bug: 332778109
Change-Id: I1131c3c764443cbaac525c6022cd09c47695d275
2024-04-04 01:58:21 +00:00
Dennis Shen
58378c9dbc use build system flag RELEASE_READ_FROM_NEW_STORAGE to drive codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Ignore-AOSP-First: code only needed for git_main, and will be removed once test mission 1 is finished.

Bug: b/332737012
Test: m
Change-Id: Ide3f432321ebd3dce9427e7cb8f2086e24d3cc31
2024-04-03 19:35:25 +00:00
Kiyoung Kim
2f4aef599a Merge "Remove PlatformVndkVersion property" into main am: 6954bd2337 am: 762d78f2f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000610

Change-Id: I17ec9730acd6e458fdfab61fa3a304b3761e35ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-03 01:39:34 +00:00
Spandan Das
0d24adea73 Convert BuildIgnoreApexContritbutions variable to a boolean
(This relands aosp/3007754. The previous sdk build failures have been
resolved now)

The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored

Bug: 308187268
Test: m nothing on aosp,google and google_fullmte devices
Merged-In: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
(cherry picked from commit f3df7305d653471c70d131177e773b4723247e3a)
Change-Id: I9d57d899c6a9a321e2eb3579c954641f2cb04709
2024-04-03 01:02:00 +00:00
Kiyoung Kim
6954bd2337 Merge "Remove PlatformVndkVersion property" into main 2024-04-03 00:48:04 +00:00
Spandan Das
81846c5dd1 Merge "Add a warning that Use_source_config_var is being deprecated." into main am: e8abc2389e am: 59f3b31563
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3021333

Change-Id: I142611cb46b2d5a530d40cb49da344016beec146
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-02 01:52:06 +00:00
Spandan Das
a9cf0c8f5b Add a warning that Use_source_config_var is being deprecated.
Bug: 308188211
Test: None # documentaiton change
Change-Id: I28c7d84ed25e1aa51648c3b29cf04b1309f9a498
2024-04-01 22:37:38 +00:00
Cole Faust
1902b6a283 Merge "Add tests for new boolean addition behavior" into main am: 488868ddf4 am: 1768f60667
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3016591

Change-Id: I8106d1995866da5e8c5ac1965d9416812c182f21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-01 18:24:05 +00:00
Cole Faust
488868ddf4 Merge "Add tests for new boolean addition behavior" into main 2024-04-01 18:01:15 +00:00
Kiyoung Kim
fa13ff194c Remove PlatformVndkVersion property
Platform VNDK version is no longer available based on VNDK deprecation.
Remove all code using Platform VNDK version.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7d0f7e23eff5d153346890f242a94b78bad6736b
2024-04-01 16:37:20 +09:00
Jiyong Park
19d4124c31 Merge "fix: required deps of phony modules are correctly tracked" into main am: 4d4eb59a2b am: 27b501f91c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3013014

Change-Id: Id6fcd8dfc1de3783d3f14c506dcfce4b569e593c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-30 14:20:21 +00:00
Jiyong Park
4d4eb59a2b Merge "fix: required deps of phony modules are correctly tracked" into main 2024-03-30 13:48:48 +00:00