diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2022-07-07 09:20:22 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-07-07 09:20:22 +0000 |
commit | 7255d92bbb61cc6eb0536025b01d48f645754d47 (patch) | |
tree | 3252319c1d3473a526feb077b0414cbcfa9bd4db | |
parent | 116ae871ea77285c8a8f0ddb3657c94452bf8474 (diff) | |
parent | b0de41399abe45df61f55dec496f95b5fd352468 (diff) | |
download | hashbrown-7255d92bbb61cc6eb0536025b01d48f645754d47.tar.gz |
Enable tests am: 78aefa6cf4 am: b0de41399a
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/hashbrown/+/2146861
Change-Id: I5cd4bbc9dfc510ba6869a0824a58f6c0c17331b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 72 | ||||
-rw-r--r-- | TEST_MAPPING | 18 | ||||
-rw-r--r-- | cargo2android.json | 6 |
3 files changed, 94 insertions, 2 deletions
@@ -37,6 +37,78 @@ license { ], } +rust_test { + name: "hashbrown_test_src_lib", + host_supported: true, + crate_name: "hashbrown", + cargo_env_compat: true, + cargo_pkg_version: "0.12.1", + srcs: ["src/lib.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, + test_options: { + unit_test: true, + }, + edition: "2021", + features: [ + "ahash", + "default", + "inline-more", + ], + rustlibs: [ + "libahash", + "libfnv", + "liblazy_static", + "librand", + "librayon", + "libserde_test", + ], +} + +rust_defaults { + name: "hashbrown_test_defaults", + crate_name: "hashbrown", + cargo_env_compat: true, + cargo_pkg_version: "0.12.1", + test_suites: ["general-tests"], + auto_gen_config: true, + edition: "2021", + features: [ + "ahash", + "default", + "inline-more", + ], + rustlibs: [ + "libahash", + "libfnv", + "libhashbrown", + "liblazy_static", + "librand", + "librayon", + "libserde_test", + ], +} + +rust_test { + name: "hashbrown_test_tests_hasher", + defaults: ["hashbrown_test_defaults"], + host_supported: true, + srcs: ["tests/hasher.rs"], + test_options: { + unit_test: true, + }, +} + +rust_test { + name: "hashbrown_test_tests_set", + defaults: ["hashbrown_test_defaults"], + host_supported: true, + srcs: ["tests/set.rs"], + test_options: { + unit_test: true, + }, +} + rust_library { name: "libhashbrown", host_supported: true, diff --git a/TEST_MAPPING b/TEST_MAPPING index aa301aa..e3e692f 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -2,6 +2,15 @@ { "presubmit": [ { + "name": "hashbrown_test_src_lib" + }, + { + "name": "hashbrown_test_tests_hasher" + }, + { + "name": "hashbrown_test_tests_set" + }, + { "name": "keystore2_legacy_blobs_test" }, { @@ -13,6 +22,15 @@ ], "presubmit-rust": [ { + "name": "hashbrown_test_src_lib" + }, + { + "name": "hashbrown_test_tests_hasher" + }, + { + "name": "hashbrown_test_tests_set" + }, + { "name": "keystore2_legacy_blobs_test" }, { diff --git a/cargo2android.json b/cargo2android.json index bf78496..41494dc 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -1,4 +1,6 @@ { "device": true, - "run": true -}
\ No newline at end of file + "patch": "patches/Android.bp.patch", + "run": true, + "tests": true +} |