• Home
Name Date Size #Lines LOC

..--

aho-corasick/06-Sep-2024-342336

async-trait/06-Sep-2024-11,66711,662

either/06-Sep-2024-2,6872,681

plotters/06-Sep-2024-32,71232,707

rustc-demangle-capi/06-Sep-2024-305299

README.mdD06-Sep-20241.1 KiB3324

README.md

1# Test data for `cargo_embargo`
2
3The files here are used for `cargo_embargo` integration tests. Run the tests with
4
5```shell
6atest --host cargo_embargo.test
7```
8
9## Handling changes in Cargo output
10
11When the output of `cargo metadata` changes, you need to update the
12`cargo.metadata` files found in the subdirectories here. Do this with:
13
14```
15for crate in aho-corasick async-trait either plotters rustc-demangle-capi; do
16    pushd $ANDROID_BUILD_TOP/external/rust/crates/$crate
17    cargo metadata --format-version 1 | jq --sort-keys \
18      > $ANDROID_BUILD_TOP/development/tools/cargo_embargo/testdata/$crate/cargo.metadata
19    popd
20done
21```
22
23Run the integration tests again after updating the crate metadata.
24
25Some tests will likely fail because of outdated information in the other test
26files:
27
28- `expected_Android.bp`: Adjust the version numbers to match the current version
29  from `cargo.metadata`.
30- `crates.json`: Adjust version numbers and `package_dir` as necessary.
31- `cargo_embargo.json`: Adjust the list of Cargo features if this has changed
32  since the file was last touched.
33