aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-07-07 10:18:06 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-07-07 10:18:06 +0000
commitb17da3b606d334b56b682f435beb1b0bea29df12 (patch)
tree3252319c1d3473a526feb077b0414cbcfa9bd4db
parente3edea6ae1aa458b1769d8c839e3121aaa3cbc1a (diff)
parent4bc4774a05012dfaa8a1dfdb0af440c7913d1353 (diff)
downloadhashbrown-b17da3b606d334b56b682f435beb1b0bea29df12.tar.gz
Enable tests am: 78aefa6cf4 am: b0de41399a am: 7255d92bbb am: 8050171323 am: 4bc4774a05
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/hashbrown/+/2146861 Change-Id: I2bda4f56671aa370c993d611a26ac4ecf8c93d14 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
+}