aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-07-07 12:04:17 +0200
committerJeff Vander Stoep <jeffv@google.com>2022-07-07 12:37:51 +0200
commit5e40fefc09ed8aae9509af18291a4427b656ebb7 (patch)
treef511b8fc7ae7471fcc7a07a2a3815af9312c3d7c
parentf00e7b162bf961007f2b128544373a0cbaaf188d (diff)
downloadserde_derive-5e40fefc09ed8aae9509af18291a4427b656ebb7.tar.gz
Enable tests
I'm not sure why this was enabled for device, but that doesn't appear to be necessary, and doesn't really make sense to compile proc_macros for device. Test: atest Change-Id: I0cf318b366778647f94e3d50493c453fbf68faa1
-rw-r--r--Android.bp26
-rw-r--r--TEST_MAPPING18
-rw-r--r--cargo2android.json7
3 files changed, 48 insertions, 3 deletions
diff --git a/Android.bp b/Android.bp
index d7a8421..ab35b60 100644
--- a/Android.bp
+++ b/Android.bp
@@ -54,4 +54,30 @@ rust_proc_macro {
"libquote",
"libsyn",
],
+ compile_multilib: "first",
+}
+
+rust_test_host {
+ name: "serde_derive_test_src_lib",
+ crate_name: "serde_derive",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.136",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
+ edition: "2015",
+ features: ["default"],
+ cfgs: [
+ "ptr_addr_of",
+ "underscore_consts",
+ ],
+ rustlibs: [
+ "libproc_macro2",
+ "libquote",
+ "libserde",
+ "libsyn",
+ ],
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index ded2f71..07f614f 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -14,9 +14,15 @@
"path": "external/rust/crates/either"
},
{
+ "path": "external/rust/crates/hashbrown"
+ },
+ {
"path": "external/rust/crates/rand_chacha"
},
{
+ "path": "external/rust/crates/rusqlite"
+ },
+ {
"path": "external/rust/crates/serde"
},
{
@@ -79,6 +85,12 @@
"name": "libcert_request_validator_tests"
},
{
+ "name": "libkmr_common_test"
+ },
+ {
+ "name": "libkmr_derive_test"
+ },
+ {
"name": "microdroid_manager_test"
},
{
@@ -120,6 +132,12 @@
"name": "libcert_request_validator_tests"
},
{
+ "name": "libkmr_common_test"
+ },
+ {
+ "name": "libkmr_derive_test"
+ },
+ {
"name": "microdroid_manager_test"
},
{
diff --git a/cargo2android.json b/cargo2android.json
index bf78496..c4040f0 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,4 +1,5 @@
{
- "device": true,
- "run": true
-} \ No newline at end of file
+ "host-first-multilib": true,
+ "run": true,
+ "tests": true
+}