Commit Graph

5 Commits

Author SHA1 Message Date
Joel Galenson
a0d4c5e5a5 Add Ring test timeout.
This test looks like it basically never passed without this.

Test: Run cargo2android.py and see timeout.
Change-Id: Ic7ef5576efb84d78130dd45db67e50ebe41f6d9a
2021-04-06 09:36:47 -07:00
Jeff Vander Stoep
82ee11ae77 update_crate_tests.py: don't use sys.exit()
If the TEST_MAPPING cannot be generated, print the reason, but
exit without error. It's not uncommon for the output of cargo2android
to fail to build e.g. if a new depencency is not satisfied, so we can
fall back to the previous TEST_MAPPING, or run update_crate_tests
locally once all dependencies are present.

Bug: 179132533
Test: tools/external_updater/updater.sh update rust/crates/textwrap
Test: tools/external_updater/updater.sh update rust/crates/libc
Change-Id: I4802c77332d1ab1d6604d48c47365f40bdbd1122
2021-02-04 12:10:39 +01:00
Jeff Vander Stoep
1b24dc3f71 update_crate_tests: fail gracefully
Allow this script to accept a path to the crate being updated.
This allows it to be run separately from cargo2android.

Also, fail gracefully on error. TEST_MAPPING update failures should
not block crate updates.

Test: tools/external_updater/updater.sh update rust/crates/libc
Bug: 179132533
Change-Id: I3a4229f479ab3d2793df16b470f0a0632b9ee495
2021-02-03 21:42:40 +01:00
Jeff Vander Stoep
0b0e24f201 update_crate_tests.py: allow excluding tests by name or path
The aidl tests and ChromeOS tests are not intended to be run in
presubmit, so exclude them.

Test: run cargo2android in external/rust/crates/libc.
Change-Id: I1ed92ed6e88886e3fea38612325ce5349db0fb69
2021-01-24 22:19:50 +01:00
Jeff Vander Stoep
cec8bac2cb Cargo2Android: add rdep tests to TEST_MAPPING
This is important because:
1. Some crates do not have their own tests enabled in presubmit.
2. As much as possible, we try to stick with one version of each
   crate. This often results in using different versions of
   dependencies than a crate has specified in its Cargo.toml.

Ensuring that a crate's tests continue to pass when its dependencies
are upgraded improves our confidence that the update is safe.

The underlying implementation uses the new Bazel queryview
to query modules and reverse dependencies.

Bug: 168167373
Test: Run cargo2android.py on a number of crates including rusqlite,
scopeguard, lock_api.

Change-Id: Id24f2d3267cf8d5e0369ece2442f8971d4ab1343
2021-01-15 20:56:59 +01:00