aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2021-10-19 15:44:24 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-10-19 15:44:24 +0000
commit87e76bb1795c926c7ab54d42814583ba3118c24a (patch)
tree91688f3639e1cc0dd70d3cfb83206e7c57bc3690
parent548f258384a2254bb021f387e598243e44227cb8 (diff)
parentfff6d9d2b311cec57139e4f5b6a2e1292e7e3f4e (diff)
downloadlazycell-87e76bb1795c926c7ab54d42814583ba3118c24a.tar.gz
Enable tests am: b51ade7241 am: 1a3f99f3d7 am: 0e77863bb9 am: fff6d9d2b3
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/lazycell/+/1862633 Change-Id: Idb50aa152edacc3df0ca516802d1084a1ad4dfb8
-rw-r--r--Android.bp31
-rw-r--r--TEST_MAPPING3
2 files changed, 33 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 10e72a6..9ffbcc2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --run --dependencies --device.
+// This file is generated by cargo2android.py --run --dependencies --device --tests.
+// Do not modify this file as changes will be overridden on upgrade.
package {
default_applicable_licenses: ["external_rust_crates_lazycell_license"],
@@ -36,10 +37,38 @@ license {
],
}
+rust_defaults {
+ name: "lazycell_test_defaults",
+ crate_name: "lazycell",
+ // has rustc warnings
+ srcs: ["src/lib.rs"],
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.3.0",
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+}
+
+rust_test_host {
+ name: "lazycell_host_test_src_lib",
+ defaults: ["lazycell_test_defaults"],
+ test_options: {
+ unit_test: true,
+ },
+}
+
+rust_test {
+ name: "lazycell_device_test_src_lib",
+ defaults: ["lazycell_test_defaults"],
+}
+
rust_library {
name: "liblazycell",
+ // has rustc warnings
host_supported: true,
crate_name: "lazycell",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.3.0",
srcs: ["src/lib.rs"],
edition: "2015",
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index d87563d..e548a18 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -5,6 +5,9 @@
"name": "keystore2_test"
},
{
+ "name": "lazycell_device_test_src_lib"
+ },
+ {
"name": "legacykeystore_test"
},
{