Commit Graph

3950 Commits

Author SHA1 Message Date
Andrew Walbran
a1468cca18 Add more doc comments and break up parse_cargo_out function.
This is a step towards making it testable.

Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I693ea16adf82f73c73a93e8dfa5ed4f351760828
2023-08-16 10:34:29 +01:00
Treehugger Robot
e64a580e9f Merge "Make tests configuration option optional." into main 2023-08-15 18:52:25 +00:00
Treehugger Robot
4266276d42 Merge "Add test for generating Android.bp from list of crates." into main 2023-08-15 18:51:45 +00:00
Treehugger Robot
3c9af85e16 Merge "Remove emit_list." into main 2023-08-15 18:36:13 +00:00
Andrew Walbran
8e86dfe14e Make tests configuration option optional.
Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: Ia35acdcad920e0f585cc5be650f1d1e3b6aa176d
2023-08-15 17:47:06 +01:00
Andrew Walbran
3da057735e Add test for generating Android.bp from list of crates.
Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I2be01cee617913d429ceb5f41f81126d38301ede
2023-08-15 17:47:06 +01:00
Andrew Walbran
2a4c28bf67 Remove emit_list.
It's not used anywhere.

Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I8ab1cbec7fe05997c9b24a8e0b658c092a6046ae
2023-08-15 16:54:00 +01:00
Zoe Tsou
c864e8880b The script parse_cts_report.py converts single cts report into \
three files:
    info.json
    result.csv
    summary.csv

The class Report() is implemented so that parse_cts_report.py \
can be easily used by another script aggregate_reports.py.

The script aggregate_reports.py converts multiple cts reports into \
three files:
    info.json
    result.csv
    summary.csv

Assumptions:
    1. If the input is a zip file, the struture should be
        abc.zip
        |----abc/
        |    |----test_result.xml
    2. The input file and the output directory must have existed.

Bug: 293809772
Test: `./parse_cts_report.py --report-file [a.zip, test_result.xml] \
    -d output_directory`
Test: `./aggregate_reports.py --report-files a.zip b.zip -d \
    output_directory`
Change-Id: I8e5481ecc1ebf7f370debb59cb3c065cf9edcfad
2023-08-15 08:42:03 +00:00
Zoe Tsou
0a48327c6c Merge "Convert single cts report into three files: info.json result.csv summary.csv" into main 2023-08-09 07:21:44 +00:00
Zoe Tsou
82deafccbf Convert single cts report into three files:
info.json
    result.csv
    summary.csv

Assumptions:
    1. If the input is a zip file, the struture should be
        abc.zip
        |----abc/
        |    |----test_result.xml
    2. The input file and the output directory must have existed.

Bug: 293809772
Test: ./parse_cts_report.py --report-file [a.zip, test_result.xml] \
    -d output_directory
Change-Id: I19dabdaed02408b7bf4a030394b99ed42925aa55
2023-08-09 05:48:40 +00:00
Andrew Walbran
0277236ce5 Add tests for crate_to_bp_modules.
Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: I9063a2dffea3a716224a1bd6a722e408b5eb0494
2023-08-04 18:02:21 +01:00
Zoe Tsou
4c2345a3c3 Merge "migrated the script from python2 to python3." into main 2023-08-02 08:08:40 +00:00
Matthias Männich
b417397c18 Merge "ndkabidump: switch to .stg format" into main 2023-08-01 21:36:36 +00:00
Matthias Maennich
273a2c88ee ndkabidump: switch to .stg format
Bug: 156513478
Change-Id: I1250aca298894851039b058f286b21d4c1f46716
Signed-off-by: Matthias Maennich <maennich@google.com>
2023-08-01 17:23:22 +00:00
Andrew Walbran
a314f8e3fd Split out JSON configuration reading to a separate module.
Bug: 293289578
Test: m cargo_embargo
Change-Id: I993da0c666a2dd90fa46f697553b9778e1e3ad37
2023-08-01 16:00:29 +01:00
Zoe Tsou
2baeec3a8e migrated the script from python2 to python3.
Bug: 292454054
Test: 'python3 compare_failed_tests.py test_result_a.xml
test_result_b.xml'

Change-Id: I84c5a1523c80a7672492f6c6487982ae777eef28
2023-07-31 03:35:51 +00:00
Andrew Walbran
8b488a9338 Add support for product_available and vendor_available flags.
Bug: 293289578
Test: Ran on external/rust/crates/either
Change-Id: Iaf357dc2a9e036689c07005f2f9ca3879e3e71ee
2023-07-28 11:10:59 +01:00
Treehugger Robot
aec7fe8e92 Merge "Apply riscv64 workarounds." am: fc9eaf5daa
Original change: https://android-review.googlesource.com/c/platform/development/+/2618389

Change-Id: I1978e31b867595760d15ea36fa588aae5d965c72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 01:46:26 +00:00
Dan Albert
cc5dad70f8 Apply riscv64 workarounds.
These were needed in build-ndk-prebuilts.sh too. Copy them here.

Bug: None
Test: ./update_ndk_abi.sh
Change-Id: Ia6263ff1b0936aa3a80747042662df24ddfb88e0
2023-06-06 23:39:55 +00:00
Treehugger Robot
176525b3d4 Merge "Support delete" am: d50ebda005
Original change: https://android-review.googlesource.com/c/platform/development/+/2545512

Change-Id: Ie166b2e12535d8ee19ade5aced9b445190fec8f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 11:14:43 +00:00
SzuWei Lin
2aa95c6a9c Support delete
Bug: 278860852
Test: repo_review.py -g ... --delete "..."
Change-Id: Ib986cdf0d99b5cd29e3abf8b2e282d1e586a478d
2023-05-17 11:43:01 +08:00
Treehugger Robot
c1058e7efc Merge "cargo_embargo: dedup output modules" am: 32be457c7a
Original change: https://android-review.googlesource.com/c/platform/development/+/2583718

Change-Id: Ic3fe6b120fa34e1be3b41ca09fa5200591b84b45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 00:19:15 +00:00
Frederick Mayle
3d6e609f03 cargo_embargo: dedup output modules
This is needed because of https://crrev.com/c/4517945. The new resolver
causes there to be multiple `rustc` invocations for some libraries. They
are only trivially different though, so dedup'ing the final output is
sufficient for now.

Bug: 280489895
Test: m cargo_embargo && ./android-merge-2-cargo-embargo.sh
Change-Id: If4a36e4f3847d18d03f76bad63bab6c45a9aef97
2023-05-10 14:57:13 -07:00
Xin Li
9e96ca15ed Merge "Merge Android 13 QPR3 tm-qpr-dev-plus-aosp-without-vendor@9936994" into stage-aosp-master 2023-04-21 17:40:07 +00:00
Xin Li
fa48b40c3b Merge Android 13 QPR3 tm-qpr-dev-plus-aosp-without-vendor@9936994
Bug: 275386652
Merged-In: I7aaaef7eb2ae6166bc914db81ffa1f557d4d62e1
Change-Id: I948361782cc4d58a5c2b7528bfadfa0e5d97dcd7
2023-04-18 16:31:54 -07:00
Junghoon Jang
ac6afae3d6 repo-pull: Introduce --ignore-unknown-changes arg
In the case of pulling changes of a topic which is shared by multiple
repos, if the target source tree doesn't contain all of those repos,
the script will fail to apply changes.

Introduce a new argument, --ignore-unknown-changes, which ignores
changes whose repo is not in the manifest.xml.

Test: Pulling changes of a topic which is shared by multiple repos to
  the source tree which contains part of those repos was done
  successfully with the newly introduce argument.
Change-Id: Ie999121415bc1888b714d023ca251ad89701df11
Signed-off-by: Junghoon Jang <junghoonjang@google.com>
2023-04-18 15:52:07 +00:00
Junghoon Jang
108c36c52b repo-pull: Introduce --current-branch argument
To make the script can be used from automatic scripts, introduce
`--current-branch` argument which allows pulling commits to the current
branch without creating a local branch. It will skip the prompt which
asking about the creation of a local branch.

Test: With --current-branch argument, the script doesn't ask setting
  local branch name.
Change-Id: Iff3cdebe6338bb2be738e60047d5c4dd81cde4f0
Signed-off-by: Junghoon Jang <junghoonjang@google.com>
2023-04-14 12:25:29 +00:00
Junghoon Jang
172ccfe52d repo-pull: Consider branch of repo
In the case of one source tree containing multiple repos with the same
project, but different branches, the script won't sync them properly.
To fix it, make it consider the branch along with the project.

Test: Tested syncing well in the directory which contains multiple repos
  with the same project, but different branches.
Change-Id: I9d1add4ffe85f80f8f9d6a3ae2c046473d7c4631
Signed-off-by: Junghoon Jang <junghoonjang@google.com>
2023-04-14 12:24:51 +00:00
Treehugger Robot
cf2761f253 Merge changes I3e156afa,Id7e4f2eb am: 116fa3048f am: 864082db3d
Original change: https://android-review.googlesource.com/c/platform/development/+/2513461

Change-Id: I2eb813107b7d5d0ce105e8b6909d32aa6062da39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 18:26:11 +00:00
Frederick Mayle
5a6dbaae7a cargo_embargo: detect and ignore harness-less tests
These currently cause cargo_embargo to fail. We should support them
eventually, but for now we'll ignore them to unblock crosvm merges.

Test: external/crosvm/android-merge-2-cargo-embargo.sh
Bug: 275386231
Change-Id: I3e156afa5672ddd6257c7caabd05346e060448fb
2023-03-29 15:25:57 -07:00
Frederick Mayle
04a1650a5f cargo_embargo: use enum for crate type
No behavior change intended.

This will make a following CL easier.

Test: external/crosvm/android-merge-2-cargo-embargo.sh
Bug: 275386231
Change-Id: Id7e4f2eb3f25fa12d867852a0ec95ce443949257
2023-03-29 15:24:21 -07:00
Stephen Hines
0a9432abbb Merge "Remove unused variables" am: edab2ac359 am: 1f481b6f2f
Original change: https://android-review.googlesource.com/c/platform/development/+/2495416

Change-Id: Icc8ecf904d0eb5f079bce9ccf6a8033933ee9429
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 18:47:32 +00:00
tanshanshan
16c7d86a81 Remove unused variables
Variables "bDecode" are not used in the function.

Test: mmm development/tools

Change-Id: Ic00ac4682b797c842c503cc5bc2cdbe22f68a94e
Signed-off-by: tanshanshan <tanshanshan@eswincomputing.com>
2023-03-17 15:57:27 +08:00
Logan (Tzu-hsiang) Chien
ec33f669f8 Merge "[repo-pull] Support curl hook" am: 3fe6f2d960 am: 4a1241d632
Original change: https://android-review.googlesource.com/c/platform/development/+/2433667

Change-Id: I7fed5e00ff9ec7cfb686ee3cd27de00877775f7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 23:50:03 +00:00
Logan (Tzu-hsiang) Chien
4a1241d632 Merge "[repo-pull] Support curl hook" am: 3fe6f2d960
Original change: https://android-review.googlesource.com/c/platform/development/+/2433667

Change-Id: If14e4bfe5fa0afe6053aa84e4c097a2d0a526c5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 23:06:10 +00:00
Logan Chien
5cf3c7b443 [repo-pull] Support curl hook
This commit adds a CURL command hook. This enables the Gerrit REST API
access through other authentication mechanisms.

Bug: b/269362063
Test: Run gerrit.py, repo_patch.py, repo_review.py with --use-curl=curl
Change-Id: I6dc4eb78760ee598df5065665c15d689916706f0
2023-02-23 08:32:41 -08:00
Weston Carvalho
7f194c1ee3 Merge "gerrit.py: Support .googlesource.com credentials" am: dea943b670 am: f03c096970
Original change: https://android-review.googlesource.com/c/platform/development/+/2431492

Change-Id: I47f2d85ded8bd4f6db0d18eacb46a725b57bc325
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-17 21:08:42 +00:00
Weston Carvalho
f03c096970 Merge "gerrit.py: Support .googlesource.com credentials" am: dea943b670
Original change: https://android-review.googlesource.com/c/platform/development/+/2431492

Change-Id: I8f36619d982619c717483463c5671c901d419494
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-17 20:12:00 +00:00
Weston Carvalho
bcf3bdf841 gerrit.py: Support .googlesource.com credentials
The scripts currently check that the requested domain exactly matches
one of the domains in the user's `.gitcookies` file, which causes
a "Cannot find the domain" error if the user's credentials are for all
of `googlesource.com`.

Change-Id: Ifed117e7d76c8678558720db1d518d59d986521d
2023-02-17 18:20:28 +00:00
Frederick Mayle
1f5b8d461c Merge "cargo_embargo: add option to set module visibility" am: 97f5616689 am: 5f1b7a1e59
Original change: https://android-review.googlesource.com/c/platform/development/+/2438516

Change-Id: I98bb519b530f8a4fef09f8679aee278fd9ae3466
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-16 21:22:21 +00:00
Frederick Mayle
5f1b7a1e59 Merge "cargo_embargo: add option to set module visibility" am: 97f5616689
Original change: https://android-review.googlesource.com/c/platform/development/+/2438516

Change-Id: Ie066e264a0c3441824955c1ea1e535579641801c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-16 20:08:37 +00:00
Frederick Mayle
5b2ed7a0f5 cargo_embargo: add option to set module visibility
Bug: 269356487
Test: ran on crosvm repo
Change-Id: Ibcbdd26115c0e54d3b2825e26083ed74000b7563
2023-02-15 10:55:17 -08:00
Charisee Chiw
33a2959059 Merge "Change requests for Rust update v1.66.0" am: 1ef73b3454 am: 5a9278969f
Original change: https://android-review.googlesource.com/c/platform/development/+/2399165

Change-Id: I64004c86e920db6d64bf95c798367ffffe81d4fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 00:40:19 +00:00
Charisee Chiw
5a9278969f Merge "Change requests for Rust update v1.66.0" am: 1ef73b3454
Original change: https://android-review.googlesource.com/c/platform/development/+/2399165

Change-Id: I82d3c70dc2f7f06a74804be49322b3a9f4826645
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-27 00:03:58 +00:00
Charisee
b1bf592d68 Change requests for Rust update v1.66.0
Test: ./build.py --lto=thin
Bug: 263153841
Change-Id: I7cd07a67291213dac8c80fa6b85cf746066ffb1d
2023-01-25 01:20:41 +00:00
Chris Wailes
fd21f320f2 Merge "Fix warnings from Rust 1.65.0" am: a7b72f4a02 am: 409ead5867
Original change: https://android-review.googlesource.com/c/platform/development/+/2393427

Change-Id: If9e5d4e00bc4b1399a482f116268918a223f0667
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 22:32:09 +00:00
Chris Wailes
409ead5867 Merge "Fix warnings from Rust 1.65.0" am: a7b72f4a02
Original change: https://android-review.googlesource.com/c/platform/development/+/2393427

Change-Id: Ic4997b87e64c363ff2ecc9e61927ac950ece7700
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 21:51:17 +00:00
Chris Wailes
33e7c091f5 Fix warnings from Rust 1.65.0
Bug: 250026064
Test: m rust
Change-Id: If6428513f3d6324a2930720baa69e374ea8f4d7f
2023-01-19 16:17:21 -08:00
Frederick Mayle
637e41a172 Merge "cargo_embargo: new cargo2android tool" am: c72989659a am: 9ed2a1bb41
Original change: https://android-review.googlesource.com/c/platform/development/+/2315578

Change-Id: Ic1c8e75b00c58fc199358656c9836eb05da65c93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-18 22:41:36 +00:00
Frederick Mayle
9ed2a1bb41 Merge "cargo_embargo: new cargo2android tool" am: c72989659a
Original change: https://android-review.googlesource.com/c/platform/development/+/2315578

Change-Id: I0feaa29e099f406e297b26a7d75201d559fff1fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-18 22:06:05 +00:00