A library may have both VNDK variant and stubs. The variants are tagged
with VNDK and PLATFORM in lsdump_paths.txt. create_reference_dumps.py
should generate the ABI dumps for both.
Bug: 152277104
Test: ./create_reference_dumps.py
Test: ./create_reference_dumps.py -libs libselinux
Change-Id: I2ee43d70efcdee43de821c93c31cdb628c36ecb1
The old suffixes were _core_shared and _vendor.{VER}_shared.
The new suffix is _shared. The new prefix for VNDK is vendor.{VER}_.
Bug: 147254738
Test: ./create_reference_dumps.py
Change-Id: Ieb37c14d5deaab437783c07edf268c1488afa441
The suffix of VNDK variants in out/soong was changed from
_vendor_shared to _vendor.{PLATFORM_VNDK_VERSION}_shared. This commit
updates the path pattern in create_reference_dumps.py.
Bug: 142698263
Test: ./create_reference_dumps.py -products aosp_x86 -libs libprotobuf-cpp-lite-3.9.1
Change-Id: I1c65ea68393a3b6601fde9f441be8ac3c69b18c1
This commit removes CPU variant from the paths under prebuilts/abi-dumps
so that the build system can find dumps generated from non-generic
products.
Bug: 140359871
Test: ./create_reference_dumps.py -product aosp_cf_arm64_phone \
-libs libvndksupport
Change-Id: Ib022bbfd484e327e345b554cdfd41a48692a3c68
Android build system and create_reference_dumps.py support:
- Creating dumps in vndk/ for the libraries that are LLNDK but not NDK.
- Creating dumps in platform/ for opt-in libraries.
Test: ./create_reference_dumps.py -libs libc -libs libcgrouprc
Bug: 133176785
Bug: 138219814
Change-Id: I827d8bfae2c4b6aff7e6cb835d0bf05ce1483ddf
This commmit finds the make goals by reading lsdump_paths.txt. This
fixes following problems:
1. Cannot build libraries that has been replaced by APEX stubs
(e.g. "libc" has been renamed to "libc.bootstrap")
2. Cannot lsdump with sanitizer variation suffixes (e.g. "_cfi")
Bug: 124829578
Test: create_reference_dumps.py --llndk -l libc
Test: create_reference_dumps.py --llndk -l libmediandk
Change-Id: I56d4f852f2e0dfe490e55f572bf3878f50464681
This commit removes the code path that searches lsdump files by
traversing the directory. Instead, always read the lsdump paths from
lsdump_paths.txt so that `create_reference_dumps.py` won't copy stale
lsdump files.
Bug: 121986692
Test: create_reference_dumps.py --llndk -lib libvulkan
Change-Id: I8c81dc1fd51d146da19a894c32e0df35907ba604
This commit refines the logic to pick the lsdump files for reference ABI
dumps. Before this commit, `findlsdump()` simply use `str_a in str_b`
to check whether module variant name (e.g.
`android_arm_armv7-a-neon_core_shared`) is in the path. However, this
check also matches the variant for apex modules (e.g.
`android_arm_armv7-a-neon_core_shared_apex.name`).
This commit fixes the problem by splitting each path into path
components and check whether a path component matches with the module
variant name.
Bug: 121986692
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: I98f78f460ddeb076f4ca35b7a0d9dcac4a479ae8
This commit removes the `remove_absolute_paths` argument from
`run_header_abi_dumper` because all usages pass `True`.
Test: ./tests/test.py
Test: ./tests/gen_all.py
Change-Id: Ibf5e7ff72d0c2c76ed3db1d8d272de1d3886c2c4
create_reference_dumps.py supports --build-variant which defaults to
userdebug. When the script builds libraries, it sets
TARGET_BUILD_VARIANT instead of inheriting from current environment.
Bug: 121017205
Test: ./create_reference_dumps.py --build-variant eng --llndk -libs libbinder_ndk
Change-Id: Ibe5458c2bb62ebb44755e4bb90566d39a0bd52f2
This commit makes get_build_vars_for_product get variables by
soong_ui.bash without envsetup.sh.
Bug: 120819347
Test: ./create_reference_dumps.py --llndk -libs libbinder_ndk
Change-Id: I66d1245d277d3c5459c6027ccdb88288aaf4d802
- Rename the unit test class to HeaderCheckerTest.
- Create/delete temporary directory in setUp/tearDown.
- Move make_and_copy_reference_dumps from gen_all.py to test.py.
- Remove duplicate constant paths.
- Add default arguments to LsdumpModule.
- Fix coding style.
Bug: 117582158
Test: ./gen_all.py
Test: ./test.py
Change-Id: I6345a10da5431e8057e4a9321ecce4168b7d5292
This commit fixes the built-in include directories for header-abi-dumper
unit test cases. Remove the reference to
`prebuilts/sdk/renderscript/clang-include` because we don't check out
`prebuilts/sdk` in `aosp-clang-tools` branch.
Test: PATH=out/soong/dist/bin:$PATH \
development/vndk/tools/header-checker/tests/test.py
Change-Id: Ieb24b0a53b719f4569149251efcdaa3722c0b88c
This commit cleans up several whitespaces nits, re-indent the code,
remove unnecessary data member initializers, and add missing header
guards.
Test: ./tests/test.py
Change-Id: Ibc355441aaa110280b263c5c3d8fc766941b08af
This commit refactors the `main()` function, cleans up several
indentation or spacing errors, and rewrites some code in Pythonic way.
Test: ./tests/test.py
Test: ./utils/create_reference_dumps.py
Change-Id: Ie654187bff5b5c49b421814efab0e8f308c93fa8
This commit adds an option to generate ABI dumps without compressing
them with gzip.
Bug: 111376916
Test: ./create_reference_dumps.py
Test: ./create_reference_dumps.py --compress
Change-Id: I1ad0781744a9ba6ff34ffed9418576986daeb67d
- Add a test that compares protobuf and JSON dumps.
- Add input-format=Json to header-abi-linker and diff.
Bug: 112877706
Test: ./test.py
Change-Id: Ic9be304b565a2ac58ed76e1a0fcc96530395b750
- Add a test case and data for lsdump in JSON format
- Rename command line option -text-format to -output-format
- Add option -input-format to header-abi-linker
Bug: 112877706
Test: ./test.py
Change-Id: Ia94f7ffffbcaf55f336932029883ea3635c547e9
Using 'vndk_package' will miss out on vndk libraries not being used by the
lunch target
Bug: 64267858
Test: utils/create_reference_dumps.py
Change-Id: Ifaa61aae715af7f2010aadbfa9864da7c74ca14f
Currently, we do abi checks on the system variants of llndk libraries.
Therefore, add an 'llndk' flag to specify that the system variant should be
built.
Bug: 77101345
Test: utils/create_reference_dumps.py --llndk -l libdl produces
libdl references.
Change-Id: Id4c607674f096daf041520d4a1ca43199d4451da
- pick up lsdump paths from
$(OUT_DIR)/lsdump_paths/$(TARGET_PRODUCT)/paths.txt instead of
searching through out/soong/.intermediates.
- llndk lsdumps also get picked up and copied to ref dump dir root now
- creation of references are more fine grained to take into account
target arch variant and cpu variant as well.
- references for vndk libs and llndk libs for all target archs and
variants can be generated with one invocation of the script now.
Test: utils/create_reference_dumps.py -l libjpeg -l libc++ -l libc
Test: utils/create_reference_dumps.py -l libjpeg -l libc++ -l libc
--no-make-lib
Test: utils/create_reference_dumps.py
Change-Id: I9105900b70c62c01f8282e1782cb38a42f4d4356
Remove the additional step of gzipping reference dumps manually.
Test: utils/create_reference_dumps.py --version current -ref-dump-dir
$ANDROID_BUILD_TOP/prebuilts/abi-dumps/vndk; mm -j64 in
external/libexif.
Change-Id: Ib22a3b4fa90e4f849529efc4b03ab43d87996458
The key being added to respective maps which facilitate diffing of
unreferenced user defined types was earlier the linker set key. The
unique id should be used instead. This is because linker set keys for C
and C++ types can be the same, but their unique id's cannot. Thus,
having linker set keys as a key leaves open the possibility of false
type aliasing, whereas the unique id does not.
Test: python3 tests/test.py
Test: python3 tests/test.py \
MyTest.test_libc_and_cpp_with_unused_struct_and_libc_and_cpp_with_unused_cstruct;
before this change, this test fails; after this change, the test
passes.
Change-Id: I91816167a48308a8c812d01e0a09e9bb70c60b50
Since we now build and install all vndk libraries,regardless of
dependencies, we may just look for all files with the extension '.lsdump' for
TARGET_ARCH and TARGET_2ND_ARCH, and copy them to the given reference dump
directory.
Test: utils/create_reference_dumps.py --version current -ref-dump-dir
<dir> creates reference dumps at <dir>
Change-Id: Ic9db57b00614b3e8dc18d8e56eab4bd87df1723c
Previously, the tests mainly exercised header-abi-diff.
After this change, checked-in reference dumps are compared with
generated dumps. This allows us to:
- get header-abi-dumper and header-abi-linker involved in testing
better.
- Know about any incompatbile message format changes made
inadvertently.
Test: tests/test.py; all tests pass.
Change-Id: I7c7ba0811e6c08c6194a0a11616680279e7a0e1d
1) We do not involve the build system to create test reference dumps. Symbols
in tests, are faked through version scripts to avoid checking in prebuilt .so
test files.
2) Also add a script to create reference abi dumps.
3) Fix a comment in ast_processing.cpp
Test: Run tests/test.py, all tests run and pass on generic arm64, mips64
and x86_64 builds.
Change-Id: Id3a420c1ae093a05a79da4c29e85071f28d714d1