Commit Graph

34185 Commits

Author SHA1 Message Date
Zhi Dou
ce3f8d4352 add a read only flag for demo
Bug: 298754733
Test: atest AconfigDemoUnitTests
Change-Id: Ib01918b2469ea59091b47d49672800b5716beb88
2023-09-15 14:17:25 +00:00
Hsin-Yi Chen
2f5228f1dc Merge "Exclude version blocks by patterns" into main 2023-09-15 08:06:18 +00:00
Hsin-Yi Chen
5e00b7aba7 Exclude version blocks by patterns
The version blocks ending with _PLATFORM and _PRIVATE are unstable ABIs.
To exclude them, header-abi-linker --exclude-symbol-version should
accept patterns like *_PLATFORM and *_PRIVATE.

Test: ANDROID_BUILD_TOP=`realpath .` \
      PATH=$PATH:`realpath out/soong/dist/bin` \
      development/vndk/tools/header-checker/tests/test.py
Test: LD_LIBRARY_PATH=out/soong/dist/lib64 \
      out/soong/host/linux-x86/nativetest64/header-checker-unittests/header-checker-unittests
Bug: 298626434
Change-Id: Id82bc013b8de62b5ba8e5bd29f399b1b72ab5d39
2023-09-15 05:13:51 +00:00
James Farrell
6c90665cee Merge "Support adding suffixes to module names and deps." into main 2023-09-13 19:32:43 +00:00
James Farrell
56475b17c5 Support adding suffixes to module names and deps.
This is helpful for crates like protobuf and syn for which we have
multiple versions, and will let us eliminate several patch files

Test: Ran it on everything in external/rust/crates.
Change-Id: I29ac1ee69be99b7164e1458e0d8fc1cb028b15a0
2023-09-13 18:00:42 +00:00
Treehugger Robot
178665e03b Merge "Add some type annotations, mainly to help the IDE." into main 2023-09-12 22:29:25 +00:00
James Farrell
a5c22d559c Add some type annotations, mainly to help the IDE.
No functional changes.

Test: Ran it.
Change-Id: Ifedf1c42628dae03968eeefd5101ae75456acd32
2023-09-12 21:14:33 +00:00
Hsin-Yi Chen
c0d2b6e79b Merge "Let build-prebuilts.sh compile unit tests" into main 2023-09-12 07:00:36 +00:00
Elliott Hughes
e1b30f6745 Merge "Fix covreport folder permission" into main 2023-09-11 17:38:45 +00:00
Hsin-Yi Chen
9beee3bf06 Let build-prebuilts.sh compile unit tests
build-prebuilts.sh compiles header-checker-unittests by default. The
continuous builds ensure that the tests are compilable. The developers
can use the script to build the tests locally.

Test: OUT_DIR=out BUILD_BROKEN_DISABLE_BAZEL=1 \
      development/vndk/tools/header-checker/android/build-prebuilts.sh \
      header-checker-unittests
Test: OUT_DIR=out BUILD_BROKEN_DISABLE_BAZEL=1 DIST_DIR=/tmp/distdir \
      development/vndk/tools/header-checker/android/build-prebuilts.sh
Bug: 280008249
Change-Id: I32d6ade3c527785d68802c1737c94f963ead5b3c
2023-09-11 18:36:54 +08:00
Joey Jiao
ddd7c0ff87 Fix covreport folder permission
Change-Id: I671c0ddc1cd0632c3d81c9ec68825decc92b065a
2023-09-08 08:56:27 +08:00
Martin Geisler
6f634869e6 Merge "Revert "Rename libsyn to libsyn2"" into main 2023-09-07 14:01:47 +00:00
Treehugger Robot
c55eea75d2 Merge "Update to clang-r498229b" into main 2023-09-07 11:55:35 +00:00
Yi Kong
f8d367d015 Update to clang-r498229b
Bug: 293616148
Change-Id: Ic77a78f463691aa2c927cfa6bea009ef38e9f0d7
Test: presubmit
2023-09-07 10:48:55 +00:00
Zoe Tsou
ad5a7859c8 Merge "Implement folder input." into main 2023-09-07 09:24:59 +00:00
Zoe Tsou
e07b08ce7f Implement folder input.
One flag '-f' corresponds to one directory that stores a parsed report.

Bug: 296988808
Test: ./compare_cts_reports.py -r test_result_1.xml [test_result_2.xml] \
    [-r report.zip] [-f parsed_dir_1/] [-f parsed_dir_2/] -m n -d output_dir/
Change-Id: I26310982dc8ef18f5dbfb1a8382ea3a600508fbe
2023-09-07 03:25:58 +00:00
Treehugger Robot
1c8730d71c Merge "device_supported is true by default, no need to specify it." into main 2023-09-06 18:18:05 +00:00
Treehugger Robot
210030f1af Merge "Default device_supported and host_supported to true in serde." into main 2023-09-06 18:04:52 +00:00
Andrew Walbran
a8ccd6f364 device_supported is true by default, no need to specify it.
Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I54b6586b4b5940d0e94a2a8f4b35c267792c4842
2023-09-06 16:15:54 +01:00
Andrew Walbran
2e6cec5a0f Default device_supported and host_supported to true in serde.
This is cleaner than using .unwrap_or(true) wherever they are used.

Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I763adf0cc51721408adf55b966ed4304e2766c00
2023-09-06 16:11:21 +01:00
Martin Geisler
a6fe26c146 Revert "Rename libsyn to libsyn2"
This reverts commit 7705ea6d36.

Reason for revert: I believe this is stale since `libsyn` is version 2 now:

https://cs.android.com/android/platform/superproject/+/main:external/rust/crates/syn/Android.bp;l=41;drc=fcd71dcc29ef325341ea7c1a145591b349018eb3

Change-Id: I31892447cf95d094e4bb201c4d86a28c70085467
2023-09-01 14:08:46 +00:00
Zhi Dou
a4f2876d42 Merge "Run unit test with the prod flag java lib" into main 2023-08-31 21:19:01 +00:00
Zhi Dou
32120e43e1 Run unit test with the prod flag java lib
Bug: 295561701
Test: m AconfigDemoUnitTests
Change-Id: Ib906c285ee6b4ebc04fde0e09555fb3c56453d16
2023-08-31 18:22:19 +00:00
Treehugger Robot
6ca8712996 Merge "Update add3prf for MetadataURLValid" into main 2023-08-30 05:26:12 +00:00
Hsin-Yi Chen
ebd7ca9041 Merge "Rename Target to Arch in header-checker utils.py" into main 2023-08-29 10:06:40 +00:00
Hsin-Yi Chen
beda56ad5c Rename Target to Arch in header-checker utils.py
"target" refers to a target arch, a build target, or a make target.
This commit renames the class and the variables to avoid ambiguity.

Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      -products aosp_x86_64 -release trunk_staging
Bug: 297542516
Change-Id: Icfb06e18333d56af802c74494c1d158f367026c9
2023-08-29 08:58:49 +00:00
Hsin-Yi Chen
3b20634c59 Merge "Pass release configuration to create_reference_dumps.py" into main 2023-08-29 08:57:44 +00:00
Jeongik Cha
4e8edb4a2c Update add3prf for MetadataURLValid
url field has been deprecated in favor of the identifier field.

Test: check output
Change-Id: I1d642d74f51244d59de4d5c44c4b9878873dd0d6
2023-08-29 11:26:17 +09:00
Hsin-Yi Chen
0433a86ffd Pass release configuration to create_reference_dumps.py
This commit adds -release as a parameter to create_reference_dumps.py.
It is currently optional. Developers can use it to try different
release configurations.

Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      -products aosp_x86_64 -release trunk_staging
Bug: 297542516
Change-Id: Ifb7001ed42dbb9f8d0dd8e6c9738be6d5ea2feca
2023-08-28 08:06:13 +00:00
Zoe Tsou
718ef28b58 Merge "Implement N way comparison." into main 2023-08-25 08:44:47 +00:00
Zoe Tsou
48f8bf931f Implement N way comparison.
The attributes tested_items and pass_rate are added for easier display in the
n_way_comparison function.

Bug: 296988808
Test: ./compare_cts_reports.py -r test_result_1.xml -r test_result_2.xml -m n \
      -d output_dir
Change-Id: I1dc6bb9c33dfe5be879cbdc13f684bde123e5e71
2023-08-25 07:41:01 +00:00
Treehugger Robot
a3f72f8382 Merge "cargo2rulesmk.py: Support customizing rustc" into main 2023-08-25 05:36:16 +00:00
Treehugger Robot
df1d22da9c Merge "cargo2rulesmk.py: Remove Python match usage" into main 2023-08-25 05:36:08 +00:00
Andrei Homescu
e88e4d6a5f cargo2rulesmk.py: Support customizing rustc
Port aosp/2633771 to cargo2rulesmk.py.

Bug: 281857510
Test: Run in sandbox on bitflags crate
Change-Id: I85b884351f621a6d96cd2b01ee5113687eb72f32
2023-08-24 22:13:45 +00:00
Andrei Homescu
fb0b60ff12 cargo2rulesmk.py: Remove Python match usage
The script uses Python match which was introduced
in Python 3.10. The sandbox only has 3.8, so we need
to remove match so the script can run.

Bug: 281857510
Test: Run in sandbox on bitflags crate
Change-Id: Id03b0e02f8593b551f2aca201fe0ed2659d58d21
2023-08-24 22:13:39 +00:00
Treehugger Robot
8df3496e01 Merge "Move logic for detecting different kinds of externs to cargo_out." into main 2023-08-23 11:35:00 +00:00
Treehugger Robot
e1c97bd7e9 Merge changes I5a2e2871,I53b1f37e,I693ea16a into main
* changes:
  Split cargo_out into three modules.
  Factor out functions to find package directory.
  Add more doc comments and break up parse_cargo_out function.
2023-08-23 11:07:41 +00:00
Treehugger Robot
795b8b2e6f Merge "STT: combined build supports more targets to build" into main 2023-08-23 06:11:12 +00:00
Justin Yun
f44122fa9b STT: combined build supports more targets to build
The script allows adding more targets using -a option multiple time.
Only a single -a will test aba build as before, but adding multiple
-a options will build the targets in sequence.

Bug: 293821290
Test: combined_build_test.sh -t primary -v userdebug -d out_dist \
                     -a alter1 -a alter2 -a alter3 -c -o -r droid
Change-Id: I3bc4d2f0dad6bac7aa32b165ca667334f90eb83b
2023-08-23 10:57:49 +09:00
Zoe Tsou
c771718b72 Merge "Compare two cts reports." into main 2023-08-22 09:27:40 +00:00
Zoe Tsou
9ea1b08298 Compare two cts reports.
Assumptions:
    1. The input report file can be a zip file result from a standard cts
       test tool, or a test_result.xml
    2. If there are multiple cts reports after the -r flag, it means to view
       these files as one report. The script aggregates them according to the
       same rules as b/293809772.

Bug: 296323842
Test: ./compare_cts_reports.py -r [a.zip, test_result_1.xml] -r [b.zip,
      test_result_2.xml] -m [1, 2] [-d output_directory] [-o]
Change-Id: I885dd07cd40d38ba0c2ee1cb38570a926606a4d9
2023-08-22 05:08:45 +00:00
Vinh Tran
7c7c46b596 Merge "Fix path to add3prf.py when calling from get_rust_pkg.py" into main 2023-08-21 01:30:07 +00:00
Zhi Dou
4db54e9935 Merge "Add demo code for testing" into main 2023-08-18 20:35:46 +00:00
Zhi Dou
3c4cc122eb Add demo code for testing
This change add demo for using test mode flag lib in
self-instrumentation tests.

There are two options.

The option 1 is to create two versions, prod and test, of the library
using flags. The prod version library uses prod flag lib, and the test
version library uses test flag lib.

The option 2 is to dynamically link to the flag lib in the library. The
flag lib is used as a stub lib and is just used for building purpose.
The in the finally binary which uses the library, the binary should
statically link to the right version of the flag lib.

Bug: 295561701
Test: atest AconfigDemoUnitTests1 && atest AconfigDemoUnitTests2

Change-Id: Ie571a260d9042933032c702095808dbf59d1697c
2023-08-18 19:45:14 +00:00
Vinh Tran
46e085a961 Fix path to add3prf.py when calling from get_rust_pkg.py
When --add3prf is set, `get_rust_pkg.py` script `cd` into the crate directory and run `add3prf.py`. However, `add3prf.py` doesn't exist in the newly downloaded crate directory. This CL ensures that we reference to the existing `add3prf.py` script.

Test: development/scripts/get_rust_pkg.py -add3prf -v -o /tmp tinyjson-2.5.1
Change-Id: I4273d4f2b6a1f353960adbbab9abbb96bf3e68f3
2023-08-18 10:21:56 -04:00
Treehugger Robot
4bed088780 Merge "cherry pick: Create rust codelab via a Rust lib used by a system app" into main 2023-08-16 18:52:11 +00:00
Dennis Shen
f422a8b846 cherry pick: Create rust codelab via a Rust lib used by a system app
Bug: b/295875546
Change-Id: I3b0e6133c4c007843d24501476a9d391241019b0
Merged-In: I3b0e6133c4c007843d24501476a9d391241019b0
2023-08-16 18:00:32 +00:00
Treehugger Robot
481b4c64f4 Merge "Update codelab system app to use native code" into main 2023-08-16 17:54:51 +00:00
Dennis Shen
22860d2f33 Update codelab system app to use native code
Bug: b/291771121
Test: tested on local devices
Change-Id: I1532d89ef185c584d3cc76c0541a0f47e622e3fb
Merged-In: I1532d89ef185c584d3cc76c0541a0f47e622e3fb
2023-08-16 17:21:29 +00:00
Treehugger Robot
8449944a50 Merge "Rename libsyn to libsyn2" into main 2023-08-16 17:10:05 +00:00