Ensure that output and errors from the underlying build command are
streamed for real-time build progress updates and debugging.
This change strips out all code that is currently unecessary and adds
tests for the remaining functionality.
Test: atest --host build_test_suites_local_test build_test_suites_test
Bug: 330365727
Change-Id: I7ef98d6654fe1435cf67c15e2c516a0967e03a75
Compression factor, as discussed, should be a configurable build
property. This flag here will control that. From initial analysis, it
looks like 64k is a good default. go/variable-block-vabc-perf
Bug: 313962438
Test: th
Change-Id: I2bddede22655e36446e734ac1917be560b1a3a1b
Create one library for reading protos from all containers, instead of
having numerous libraries perform the same logic. For Java, we will
create a similar library reusing the same
partition_aconfig_flags_paths.txt.
Bug: 324436145
Test: adb shell aflags list # Confirm that various containers appear
Change-Id: I924e281a50f9a609e1c07c03267eebe3dce52752
Add a script to make it easier to check-flagged-apis for the public APIs
and the three flavours of @FlaggedApi.
Bug: 334870672
Test: lunch sdk-next-eng && source check-flagged-apis.sh
Change-Id: I8b5e2642ade84560c5c61ae49d8c0dcdedb841ca
Replace the current unit test runner DeviceJUnit4ClassRunner with JUnit4
and replace the (larger) dependency tradefed with the (smaller)
dependency junit.
This has no impact other than minimizing the unit test static_libs.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I0520ab0feeea5ea2ed15905136ba2647f86162cb
USE_PREBUILT_SDK_TOOLS_IN_PLACE is not set anywhere else after
aosp/3043552 lands.
Bug: 122333025
Bug: 332464939
Test: m
Change-Id: I55490cdc0a7036263876ecbb322cc5b4af8d1959
Add a function to log the invocation of tools run from the Android
build environment. This enables analyzing and optimizing developer
flows.
Note that there are no tools currently leveraging the logging
facility. Logging is also disabled by default and not configured to
use any particular logger.
Test: atest run_tool_with_logging_test
bug: 331638854
Change-Id: I001ba3c6c30b3ffc95d0fdb30ea7178a991c680f
Teach check-flagged-apis to cross-check the data from its three input
sources. This allows the tool to detect
- @FlaggedApi references to non-existent flags
- @FlaggedApi APIs present in the build artifacts even though the flag
is disabled
- @FlaggedApi APIs not present in the build artifacts even though the
flag is enabled
By passing in different sources, the tool can detect these errors for
any of the API surfaces (public, @SystemApi(MODULE_LIBRARIES), etc).
Note: the tool assumes that a disabled flag means that the @FlaggedApi
should not be present in the build output. This is currently true, but
won't be once metalava starts reverting @FlaggedApis to their previous
SDK snapshot.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt --flag-values out/soong/.intermediates/all_aconfig_declarations.pb --api-versions out/dist/data/api-versions.xml
Change-Id: I790234865f831af7d45895def14d1d6740365622
* changes:
check-flagged-apis: parse flag names and values
check-flagged-apis: parse API signature files
check-flagged-apis: add unit test infrastructure
Teach check-flagged-apis to parse API versions XML; this represents the
APIs after metalava has processed the source and kept APIs as is, or
reverted them to the previous SDK snapshot, according to their
@FlaggedApi flags.
As with the API signature parser, limit support to fields to keep things
simple; support for classes and methods will be added in later CLs.
Note: `m sdk dist` will generate an API versions XML file.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt --flag-values out/soong/.intermediates/all_aconfig_declarations.pb --api-versions out/dist/data/api-versions.xml
Change-Id: I779a0d0cdb8a50536d3fc8d517fa38ba4b0dcd1c
Teach check-flagged-apis to parse the parsed_flags protobuf generated by
aconfig.
Note: `m all_aconfig_declarations` generates a protobuf file that
contains all info about all flags.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt --flag-values out/soong/.intermediates/all_aconfig_declarations.pb
Change-Id: I397b32ae2a373b429ef6ce22e0a06a0f15202b91
Teach check-flagged-apis to extract flagged APIs from API signature files.
To keep things simple, only consider fields for now: support for classes
and methods will be added in a later CL.
Note: `m frameworks-base-api-current.txt` will generate an API signature
file that includes both the platform and mainline APIs.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt
Change-Id: Ic244b896672569f44af793796189b34c1f9d0c36
1, add a new field in storage metadata proto, for each container, there
is a local override file.
2, update write api to expose the api to map a writable file given the
specific path. the cannonical api will require a storage metadata proto,
and then find the right file path and map it.
3, minor update to make the proto lib cc_library instead of
cc_library_static
Bug: b/312444587
Test: atest -c
Change-Id: Iaf0aff44c1ca3ad4bffc5e06bb99bb276b9069c5
Add a value class to represent Flag names. We could use plain Strings
but having a dedicated class (with no overhead compared to String) makes
the intent of the code much clearer.
Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: Icdd4fb97d3fd49e507b7559504ea173a3dc52dea
check-flagged-apis will read contents from various sources, which use
different formats to represent the same piece information (e.g.
"class#field" or "<class><field>").
Introduce a Symbol value class to represent any API (i.e. a class, field
or method) in a unified format.
Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: Id9404294a87b23a9d43e5e13ce39ea5a92608e33
Also dirty-image-objects-phone is removed as it's really never been
used.
Bug: 335369205
Test: build
Change-Id: Ib3eab3dc4c30aaa99b90310903bcc8a86a0f3480
- Fix the timestamp variable name.
- Convert the intermediate file name extensions to those in the
prebuilt directory.
- Disable check-abi-dump-list for sanitizer and coverage builds.
- Add an exception for libRS, RISC-V.
Test: m check-abi-dump-list
Bug: 333532038
Change-Id: I35b644feed1bef1e6c74731e8f69074bdc5b0352
The SDK finalization process will create APEX ABI dumps from this
target.
Test: make findlsdumps_APEX
Bug: 333532038
Change-Id: Iaec03bd39923678141b12436e5a6b8576e63a999
ro.product.first_api_level looks like the value we actually want to read
to since it inherits from $PRODUCT_SHIPPING_API_LEVEL. Other variables
we attempted to look at were giving other values (e.g 202504 for pixel
watch)
Bug: 331202590
Test: th
Change-Id: Ied3da247cba45611132db6c9e3cdefb447891f96
This reverts commit fa5bfb9d79.
Reason for revert: we were running into OTA failures b/333966507. The reason was that OTA compatibility tools on go/absign weren't updated with our v3 compatibility tools (which turns of v3 full OTA for devices launching prior to Android 15). Once we know that go/absign is updated, we can check in this change again
Change-Id: I789c24b57754d6ede794d7f9451ee0ca469c2fb4
Use clikt as the command line options parser library.
Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: I7c406456b00e29293294dcdbef411d2543a1e8d5
Add a new CLI to verify that the build artifacts contain the right set
of @FlaggedApi APIs, based on the value of the corresponding aconfig
flag.
This CLI will act as an end-to-end test of Soong and metalava.
This CL only adds the project scaffolding; later CLs will add the
implementation.
Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: Ib00653f2a549217da2b0058867c711f35efd5760