aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-07-07 08:46:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-07-07 08:46:55 +0000
commitb0de41399abe45df61f55dec496f95b5fd352468 (patch)
tree3252319c1d3473a526feb077b0414cbcfa9bd4db
parentb6260349afaaa92052e03ca03fad31759ac9c2db (diff)
parent78aefa6cf44a3e4960209e8ff57969b0e2ee24d7 (diff)
downloadhashbrown-b0de41399abe45df61f55dec496f95b5fd352468.tar.gz
Enable tests am: 78aefa6cf4
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/hashbrown/+/2146861 Change-Id: I73fac1b29a4de2c41d0cd02df1efa6c95592f044 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp72
-rw-r--r--TEST_MAPPING18
-rw-r--r--cargo2android.json6
3 files changed, 94 insertions, 2 deletions
diff --git a/Android.bp b/Android.bp
index b35773f..03c21e3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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
+}