Commit Graph

15 Commits

Author SHA1 Message Date
Logan Chien
f58bb5f1fe header-checker: Generate ABI dumps w/o gzip
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
2018-10-08 16:33:18 +08:00
Hsin-Yi Chen
86bcedcd0c Change default dump format to JSON
Bug: 112877706
Test: ./test.py
Change-Id: I5fd00e75b804a33c982008bc95ea017b480b67cc
2018-10-03 18:05:34 +08:00
Hsin-Yi Chen
4b9b242efe Add test for loading JSON dump
- 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
2018-09-21 11:50:26 +08:00
Hsin-Yi Chen
299acf20e3 Add test for lsdump in JSON format
- 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
2018-08-27 07:01:18 +00:00
Jayant Chowdhary
b2144fb977 Unify command for creation of llndk, vndk abi references.
Bug: 64267858

Test: utils/create_reference_dumps.py creates llndk + vndk abi
      references

Test: utils/create_reference_dumps.py -l libjpeg

Merged-In: I72ae13fb9c48f23a62b959195dbd5fa6fe4c14b0
Change-Id: I72ae13fb9c48f23a62b959195dbd5fa6fe4c14b0
(cherry picked from commit a038b56c7d)
2018-04-12 09:07:39 -07:00
Jayant Chowdhary
3dc4ff3ef0 Make utils/create_reference_dumps.py slightly less slower when -l is specified.
Bug: 64267858

Test: Without this change:
          rm -rf $ANDROID_BUILD_TOP/out; utils/create_reference_dumps.py
	  -l libjpeg -> > 30 minutes
      With this change:
          rm -rf $ANDROID_BUILD_TOP/out; utils/create_reference_dumps.py
	  -l libjpeg -> approx 11.5 minutes

Change-Id: I9c145ed5d8c9a9cc2cb1dc7db9ab9b83843a291e
2018-03-29 22:43:04 +00:00
Jayant Chowdhary
1ebd366d52 Use target 'vndk' instead of 'vndk_package' while creating abi references.
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
2018-03-27 15:50:19 -07:00
Jayant Chowdhary
cd0e8aff22 Add --llndk to create_reference_dumps.py for llndk libraries.
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
2018-03-27 12:45:20 -07:00
Jayant Chowdhary
76183b7a83 Shenanigans to make create_reference_dumps.py more usable.
- 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
2018-03-01 15:11:32 -08:00
Jayant Chowdhary
d1f8fc226b gzip reference dumps while copying to ref-dump-dir.
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
2018-02-09 10:29:57 -08:00
Jayant Chowdhary
7cc00996e5 Fix map key in header-abi-diff while extracting user defined types.
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
2018-02-07 13:04:30 -08:00
Jayant Chowdhary
c18ded4bb0 Make create_reference_dumps.py faster.
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
2017-12-07 12:46:18 -08:00
Jayant Chowdhary
29092604b2 Fix how header-checker tests run.
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
2017-12-07 12:46:10 -08:00
Dan Willemsen
d3fc8faff6 Switch to new soong_ui dumpvar-mode
Stop using make directly.

Test: manual tests
Test: development/scripts/symbol.py
Change-Id: I9f75776251b693dbe979989942d2db49768224d2
2017-10-17 14:10:51 -07:00
Jayant Chowdhary
860b41407e Add more comprehensive tests for abi diffing.
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
2017-08-24 23:41:01 -07:00