Enable tests
This CL enables the tests of the crate. The Android.bp is generated by
`cargo2android.py --config cargo2android.json`.
Bug: 254153648
Test: mmm external/rust/crates/zeroize_derive
Change-Id: I0a5dd450f5ad30b26e383e7dae2a93d850b83e2f
diff --git a/Android.bp b/Android.bp
index 25551b4..7eec2ad 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,8 +1,6 @@
// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
-
-
package {
default_applicable_licenses: [
"external_rust_crates_zeroize_derive_license",
@@ -37,3 +35,23 @@
],
compile_multilib: "first",
}
+
+rust_test_host {
+ name: "zeroize_derive_test_src_lib",
+ crate_name: "zeroize_derive",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.3.2",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
+ edition: "2018",
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libsyn",
+ "libsynstructure",
+ ],
+}
diff --git a/cargo2android.json b/cargo2android.json
index 58e46ee..2e184ce 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,4 +1,5 @@
{
"host-first-multilib": true,
+ "tests": true,
"run": true
}