Commit Graph

32137 Commits

Author SHA1 Message Date
Mu-Le Lee
c2ebbbfec5 Change the format of header-abi-diff config from .ini to .json
Since Cross-Version ABI Check is introduced, the flags could be
different when diffing with previous or current dumps. The structure and
format of the newly proposed config are changed so users can configure
flags for different diff targets. This CL changes the config format from
.ini to .json with the same features the format of the json is described
in go/cross-version-abi-diff-configuration.

Test: preform abi diff with config.json
Bug: 239792343
Change-Id: I731bafbfdacd2a780c5f7a27997893cecb2eb1f3
2022-08-11 06:35:33 +00:00
Steven Moreland
ba781b8eac Merge "Create a module for create_reference_dumps.py" 2022-07-19 15:43:53 +00:00
Treehugger Robot
71caa549f3 Merge "Exclude list may have comment" 2022-07-19 06:44:43 +00:00
Justin Yun
b2143bf4dc Exclude list may have comment
With this change the exclude list file may have comments that start
with '#'

Test: Run collect_ninja_inputs.py with excluded file list that has
      '#' comments
Change-Id: Ic2e3da8a34144426e00ebd45ee09ff9cb3b339bd
2022-07-19 14:31:44 +09:00
Treehugger Robot
4a2aacdeed Merge "repo_pull: Attempt to fetch via ssh first" 2022-07-18 09:48:02 +00:00
Hsin-Yi Chen
f4f89e7224 Create a module for create_reference_dumps.py
The module is a host python binary with embedded launcher. It is
independent of the python runtime installed on the OS.

Test: m create_reference_dumps && \
      create_reference_dumps -products aosp_x86_64 -libs libc
Bug: 238984913
Change-Id: Ie84ef5c78cec978f83a2bddb370978fb962de4bd
2022-07-18 16:58:10 +08:00
Mu-Le Lee
a12115812c Merge changes If1ccc3d9,I198bf3e1,I0d903c16
* changes:
  Refactor GetRefDumpDirStem to avoid excessive arguments passing
  Generate dumps for non-VNDK into folder that matches Cross-Version ABI Check mechanism
  Generate LLNDK ABI dumps to platform/ instead of vndk/
2022-07-15 16:25:59 +00:00
Mu-Le Lee
aee4dbfae4 Refactor GetRefDumpDirStem to avoid excessive arguments passing
The arguments required by function get_ref_dump_dir_stem() would be
carried all the way to get_ref_dump_dir_stem(). In this CL, the logic
of get_ref_dump_dir_stem() would be wrapped into a class so that the
other functions can be cleaner.

Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py --llndk -l libvndksupport -l libbinder_ndk -l libprocinfo
Bug: 238828401
Change-Id: If1ccc3d9de0408c5e1ef252412630df341d38e14
2022-07-15 05:45:22 +00:00
Bob Badour
b30de650ff Merge "Replace obsolete notice property with licenses" 2022-07-15 03:00:01 +00:00
Bob Badour
4669788a83 Replace obsolete notice property with licenses
Generate `license {}` modules instead of `filegroup {}` modules.

Reference the generated `license {}` modules using the `licenses:`
property.

Bug: 192434786

Test: m droid dist
Change-Id: I894c37bba3edeeb9c6af86bee342a31c334d084c
2022-07-15 11:04:26 +09:00
Treehugger Robot
4b914d2e0d Merge "[LSC] Add LOCAL_LICENSE_KINDS to development" 2022-07-15 00:41:57 +00:00
Bob Badour
49a787d725 [LSC] Add LOCAL_LICENSE_KINDS to development
Added SPDX-license-identifier-Apache-2.0 to:
  apps/OBJViewer/Android.bp
  samples/HeavyWeight/Android.bp
  samples/MySampleRss/Android.bp
  tools/ninja_dependency_analysis/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Ic4627f424a3ecfbe65145268242a37f373c05a01
2022-07-14 11:08:07 -07:00
Mu-Le Lee
ec18592802 Generate dumps for non-VNDK into folder that matches Cross-Version ABI Check mechanism
The dumps of non-VNDK was generated to PLATFORM_SDK_VERSION. To enable
the Cross-Version ABI Check, before finalization (when
PLATFORM_VERSION_CODENAME is not REL), dumps should be generate to
current/ no matter what PLATFORM_SDK_VERSION is; After finalization,
dumps should be generate to PLATFORM_SDK_VERSION/.

Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      --llndk -l libvndksupport -l libbinder_ndk -l libprocinfo
Bug: 238573414
Change-Id: I198bf3e1fb1382a9378dcde16deb9262f0eb9f64
2022-07-14 09:46:38 +00:00
Luca Stefani
396466344b repo_pull: Attempt to fetch via ssh first
This is usually preferred if supported by the server

Change-Id: Ie15df0231a679d55ba1adfd7e7d86f4999828e27
2022-07-12 13:02:59 +00:00
Isaac Chen
125a88be13 Merge "Update Android 13 GKI KMI symbol files and test" 2022-07-12 08:45:16 +00:00
Isaac Chen
146bf2790d Update Android 13 GKI KMI symbol files and test
This change removes Android 12 GKI 5.4 and 5.10 kernel symbol files,
and adds kernel symbol files for the first public release of
Android 13 GKI 5.10 and 5.15, against which the future kernel symbol
files can be cheked to make sure GKI KMI compatibility.

Bug: 238597473
Test: $ lunch aosp_arm64-userdebug
      $ m a13_kmi_compatibility_test
Change-Id: I3b0eb7af36dd4a4174d4031735428a089278565a
2022-07-12 14:59:15 +08:00
Mu-Le Lee
1a4fb95440 Generate LLNDK ABI dumps to platform/ instead of vndk/
Since vndk libraries don't need to maintain Cross-Version abi
compatibility. The newly proposed Cross-Version ABi checking mechanism
is applied to only ndk/ and platform/. The dumps of LLNDK libraries
should be generated to platform/ to be benefited from this checking
mechanism.

Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      --llndk -l libvndksupport
Bug: 238383972
Change-Id: I0d903c16eecfd57001a539c14bd4d6945c148e3c
2022-07-09 06:13:33 +00:00
Treehugger Robot
58776972a8 Merge "Ninja dependency analysis tool" 2022-07-08 06:00:41 +00:00
Jeongik Cha
1408cdc5e6 Ninja dependency analysis tool
The tool collects every input file for target except exempted_files.
And also, it counts input files per each project.

Bug: 238156000
Test: collect_ninja_inputs \
  -n prebuilts/build-tools/linux-x86/bin/ninja \
  -f out/combined-aosp_cf_x86_64_phone.ninja \
  -t vendorimage \
  -e exempted_files \
  -r .repo/project.list

Change-Id: I19b8b3462a1f1766babe4d437fe71bd7eb4bc7d2
2022-07-08 01:28:37 +00:00
Hsin-Yi Chen
cd2a609c4e Merge "Remove MIPS data from ABI unit tests" 2022-07-07 09:11:48 +00:00
Jeffrey Vander Stoep
3a293c7bba Merge "Revert "c2a: add option to use Cargo.toml.orig"" 2022-07-07 08:24:42 +00:00
Hsin-Yi Chen
a923b62fe5 Remove MIPS data from ABI unit tests
Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
      development/vndk/tools/header-checker/tests/test.py
Bug: 237966264
Change-Id: If6c7e0fe297f384a703f0a45727618518062363e
2022-07-07 11:01:42 +08:00
Hsin-Yi Chen
bd1460dca5 Merge "Generate only the necessary data for ABI unit tests" 2022-07-07 02:41:36 +00:00
Jeffrey Vander Stoep
6529bcaf6a Revert "c2a: add option to use Cargo.toml.orig"
This reverts commit 2adbd7ed89.

Reason for revert: This doesn't work in all cases. For now I'll
instead use local patches for Cargo.toml :(

Change-Id: I0621796e694e2654a01fe9a38a307fd0a4ab8b15
2022-07-06 12:34:37 +00:00
Hsin-Yi Chen
c1965c3600 Generate only the necessary data for ABI unit tests
This commit configures "has_reference_dump" for the modules in ABI unit
tests. gen_all.py refers to the flag to creates reference dumps.

Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
      development/vndk/tools/header-checker/tests/gen_all.py
Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
      development/vndk/tools/header-checker/tests/test.py
Bug: 237966264
Change-Id: I35d5c43a20533cc71470b02919258dd883b40241
2022-07-05 18:34:24 +08:00
Hsin-Yi Chen
871a22ffae Merge "Remove -suppress-errors from header-abi-dumper" 2022-07-05 08:11:35 +00:00
Hsin-Yi Chen
93be04bf1f Remove -suppress-errors from header-abi-dumper
The purpose of the option was to parse individual header files. It's not
an effective solution to the headers that are not self-contained.

Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
      development/vndk/tools/header-checker/tests/test.py
Bug: 237966264
Change-Id: Id7321d7feb0bb28f6e0da39bc9d6a4348e038149
2022-07-05 11:33:38 +08:00
Mu-Le Lee
59b0ddfffd Merge "Create a cli option to build only the specified target rather than the whole package." 2022-07-01 04:36:57 +00:00
Mu-Le Lee
83c7085316 Create a cli option to build only the specified target rather than the whole package.
Test: OUT_DIR=out development/vndk/tools/header-checker/android/build-prebuilts.sh \
      header-abi-dumper header-abi-linker
Bug: 237229904
Change-Id: I2f52ac39201a50f081c8393528ad9dc8e953a556
2022-07-01 02:43:24 +00:00
Mu-Le Lee
aa22b20007 Merge "Remove location information of unnamed elements in dumps to avoid automerge conflict." 2022-06-27 05:25:47 +00:00
Mu-Le Lee
b55856ae03 Remove location information of unnamed elements in dumps to avoid automerge conflict.
Test: ANDROID_BUILD_TOP=`realpath .` \
      PATH=$PATH:`realpath out/soong/dist/bin`:`realpath out/soong/host/linux-x86/bin` \
      development/vndk/tools/header-checker/tests/test.py
Bug: 236800109
Change-Id: I811d9508166f11f7e69ccbc554bcac8b1f122be6
2022-06-27 03:48:03 +00:00
Treehugger Robot
1da99cc99e Merge "c2a: add option to use Cargo.toml.orig" 2022-06-23 15:34:41 +00:00
Anton Hansson
6c8cfa3386 Merge "Dist merged system annotation zip" 2022-06-23 15:07:10 +00:00
Jeff Vander Stoep
2adbd7ed89 c2a: add option to use Cargo.toml.orig
`Cargo --publish` strips dev-dependencies from Cargo.toml, an issue
that won't be fixed until [1] is resolved, which doesn't seem
likely as it has been open for ~5 years now.

cargo2android needs dev-dependencies listed in Cargo.toml in order
to generate the rust_test in Android.bp, add an option that tells
cargo2android to use the cargo.toml.orig instead of the cargo.toml.

With this change there are now two options that temporarily
update Cargo.toml, so I've pulled these out into a separate class
to clean up the code a bit.

[1] https://github.com/rust-lang/cargo/issues/4242

Test: run against projects with --add_workspace and
--orig-cargo-toml

Change-Id: I3b8633a807c9734981ebde0bef9b73868acf6774
2022-06-23 16:38:08 +02:00
Anton Hansson
8e63be9278 Dist merged system annotation zip
The system-data/annotations.zip was previously generated
by the monolithic system sdk rule. Migrate it over to the
newly introduced modularized/merged target.

Bug: 235140934
Test: m sdk dist && ls out/dist/system-data | grep annotations
Change-Id: I1afc4ef7fdf87555adecdb11296bc07d25193ca2
2022-06-23 10:14:39 +00:00
Treehugger Robot
d0e21e93fb Merge "c2a: Automatically make crates APEX available" 2022-06-22 19:25:58 +00:00
Treehugger Robot
8b3339921b Merge "Update tests due to clang variable and struct naming changes." 2022-06-22 07:58:27 +00:00
Mu-Le Lee
e5f137adf2 Update tests due to clang variable and struct naming changes.
Test: ANDROID_BUILD_TOP=`realpath .` \
      PATH=$PATH:`realpath out/soong/dist/bin`:`realpath out/soong/host/linux-x86/bin` \
      development/vndk/tools/header-checker/tests/test.py
Bug: 236780777
Change-Id: I794bcb9e9c922c642c3fbf0808fb60de4445ab65
2022-06-22 04:10:43 +00:00
Matthew Maurer
a9fb65d155 c2a: Automatically make crates APEX available
The bulk of Rust packages in external/ are OS agnostic and do not care
about individual platform features. This change is intended to reduce
the churn of repeatedly adding new `apex_available` attributes to crates
by defaulting to availability. When landing a new crate which is either
platform revision specific or has an unstable file format, prefer to
set `apex_available: ["//apex_available:platform"]` until you have
thought things through.

Bug: 174862583
Test: Regenerate with no apex_available, see universal availability
Test: Regenerate with apex_available: [], see []
Test: Regenerate with apex_available: [foo], see [foo]
Change-Id: I958597789bfc966caec043d051996284dab7a927
2022-06-16 13:07:12 -07:00
Elliott Hughes
d70c7045c1 Merge "Work around an lldb bug with "localhost"." 2022-06-15 14:26:05 +00:00
Elliott Hughes
fc6da790d9 Work around an lldb bug with "localhost".
Bug: http://b/234034124
Test: reputed to work
Change-Id: I3414201712ffe0f808899e2a2f206e813bb609a7
2022-06-14 17:59:32 -07:00
Matthew Maurer
270633f6ca Merge changes Ie8ff0e35,I4aebdb5e,I4d9b906f
* changes:
  c2a: Only use postsubmit when configured
  c2a: Denylist additional Rust tests modules
  c2a: Do not assume test_mapping.json exists
2022-06-14 23:29:35 +00:00
Matthew Maurer
e1d07ba872 c2a: Only use postsubmit when configured
Previous logic would place tests in both presubmit and postsubmit if the
postsubmit_tests configuration was not specified. This is both
unnecessary and wastes resources because presubmit tests are also run in
postsubmit.

Bug: 236006683
Test: Regenerate all TEST_MAPPINGs, manually check postsubmit removal
Change-Id: Ie8ff0e351776711e07bf7646efd916d970254e9c
2022-06-14 16:28:36 -07:00
Matthew Maurer
037b445ed8 c2a: Denylist additional Rust tests modules
These modules are not suitable for direct execution on cuttlefish, but
are still built as `rust_test` to get the harness.

Bug: 233924440
Test: Regenerate all TEST_MAPPINGs, pass presubmit
Change-Id: I4aebdb5e36cf3a80780483e0a7ebeb83e9735d29
2022-06-14 14:32:15 -07:00
Matthew Maurer
3f7f7e2236 c2a: Do not assume test_mapping.json exists
update_crate_tests would previously assume test_mapping.json existed
when trying to generate a TEST_MAPPING update. This made updating
mappings for the majority of existing crates fail.

Bug: 233924440
Test: Regenerate all Rust TEST_MAPPINGs
Change-Id: I4d9b906f4db233ee0223a3035c1b63bf1ca681f4
2022-06-14 14:32:00 -07:00
Treehugger Robot
57d34a4b72 Merge "Allow ABI dumps to contain ANDROID_BUILD_TOP that is not a path prefix" am: 1a4e4daf49
Original change: https://android-review.googlesource.com/c/platform/development/+/2122585

Change-Id: I42ea1f542eeaf7ca8cd1b8309f59ea882cdb465a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 10:28:48 +00:00
Treehugger Robot
1a4e4daf49 Merge "Allow ABI dumps to contain ANDROID_BUILD_TOP that is not a path prefix" 2022-06-13 10:05:10 +00:00
Hsin-Yi Chen
2ed4052a06 Allow ABI dumps to contain ANDROID_BUILD_TOP that is not a path prefix
Test: ./create_reference_dumps.py -products aosp_x86_64 -libs libm
Bug: 235300136
Change-Id: I75fa175018d6ed0da7a0949ff133869fd874c667
2022-06-13 16:47:32 +08:00
Yi-yo Chiang
f80aa1285c Merge "create_reference_dumps.py: Always rebuild lsdump_paths.txt" am: c38fa6eb0a
Original change: https://android-review.googlesource.com/c/platform/development/+/2096997

Change-Id: I216f5f6c765ef9ca50b23a20e0d9417dddfadf7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 04:18:27 +00:00
Yi-yo Chiang
c38fa6eb0a Merge "create_reference_dumps.py: Always rebuild lsdump_paths.txt" 2022-05-25 04:03:43 +00:00