Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." am: eb6778ca2b am: 835bfbe608 am: 9709366d77 am: bad4bc6d7f
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/serde/+/1912508
Change-Id: Idfc7ea90ba59cf0587eae0fcd03fae67ed21d639
diff --git a/Android.bp b/Android.bp
index 413167b..3568ea5 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,6 @@
rust_library {
name: "libserde",
host_supported: true,
- vendor_available: true,
crate_name: "serde",
cargo_env_compat: true,
cargo_pkg_version: "1.0.130",
@@ -75,16 +74,21 @@
"//apex_available:platform",
"com.android.virt",
],
+ vendor_available: true,
}
-rust_defaults {
- name: "serde_test_defaults",
+rust_test {
+ name: "serde_test_src_lib",
+ host_supported: true,
crate_name: "serde",
- srcs: ["src/lib.rs"],
cargo_env_compat: true,
cargo_pkg_version: "1.0.130",
+ srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2015",
features: [
"default",
@@ -111,16 +115,3 @@
],
proc_macros: ["libserde_derive"],
}
-
-rust_test_host {
- name: "serde_host_test_src_lib",
- defaults: ["serde_test_defaults"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
- name: "serde_device_test_src_lib",
- defaults: ["serde_test_defaults"],
-}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 5d1f043..da1479a 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,59 +1,55 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
{
+ "imports": [
+ {
+ "path": "external/rust/crates/base64"
+ },
+ {
+ "path": "external/rust/crates/bitflags"
+ },
+ {
+ "path": "external/rust/crates/bytes"
+ },
+ {
+ "path": "external/rust/crates/either"
+ },
+ {
+ "path": "external/rust/crates/rand_chacha"
+ },
+ {
+ "path": "external/rust/crates/serde-xml-rs"
+ },
+ {
+ "path": "external/rust/crates/serde_cbor"
+ },
+ {
+ "path": "external/rust/crates/slab"
+ },
+ {
+ "path": "external/rust/crates/tinytemplate"
+ },
+ {
+ "path": "external/rust/crates/tinyvec"
+ },
+ {
+ "path": "external/rust/crates/unicode-bidi"
+ },
+ {
+ "path": "external/rust/crates/unicode-xid"
+ },
+ {
+ "path": "external/rust/crates/url"
+ }
+ ],
"presubmit": [
{
- "name": "base64_device_test_tests_decode"
+ "name": "ZipFuseTest"
},
{
- "name": "base64_device_test_tests_encode"
+ "name": "apkdmverity.test"
},
{
- "name": "base64_device_test_tests_helpers"
- },
- {
- "name": "bitflags_device_test_src_lib"
- },
- {
- "name": "bitflags_device_test_tests_basic"
- },
- {
- "name": "bytes_device_test_src_lib"
- },
- {
- "name": "bytes_device_test_tests_test_buf"
- },
- {
- "name": "bytes_device_test_tests_test_buf_mut"
- },
- {
- "name": "bytes_device_test_tests_test_bytes"
- },
- {
- "name": "bytes_device_test_tests_test_bytes_odd_alloc"
- },
- {
- "name": "bytes_device_test_tests_test_bytes_vec_alloc"
- },
- {
- "name": "bytes_device_test_tests_test_chain"
- },
- {
- "name": "bytes_device_test_tests_test_debug"
- },
- {
- "name": "bytes_device_test_tests_test_iter"
- },
- {
- "name": "bytes_device_test_tests_test_reader"
- },
- {
- "name": "bytes_device_test_tests_test_serde"
- },
- {
- "name": "bytes_device_test_tests_test_take"
- },
- {
- "name": "either_device_test_src_lib"
+ "name": "authfs_device_test_src_lib"
},
{
"name": "keystore2_test"
@@ -65,70 +61,42 @@
"name": "legacykeystore_test"
},
{
- "name": "rand_chacha_device_test_src_lib"
+ "name": "microdroid_manager_test"
},
{
- "name": "serde-xml-rs_device_test_src_lib"
+ "name": "serde_test_src_lib"
},
{
- "name": "serde_cbor_device_test_src_lib"
+ "name": "virtualizationservice_device_test"
+ }
+ ],
+ "presubmit-rust": [
+ {
+ "name": "ZipFuseTest"
},
{
- "name": "serde_cbor_device_test_tests_bennofs"
+ "name": "apkdmverity.test"
},
{
- "name": "serde_cbor_device_test_tests_canonical"
+ "name": "authfs_device_test_src_lib"
},
{
- "name": "serde_cbor_device_test_tests_de"
+ "name": "keystore2_test"
},
{
- "name": "serde_cbor_device_test_tests_enum"
+ "name": "keystore2_test_utils_test"
},
{
- "name": "serde_cbor_device_test_tests_ser"
+ "name": "legacykeystore_test"
},
{
- "name": "serde_cbor_device_test_tests_std_types"
+ "name": "microdroid_manager_test"
},
{
- "name": "serde_cbor_device_test_tests_tags"
+ "name": "serde_test_src_lib"
},
{
- "name": "serde_cbor_device_test_tests_value"
- },
- {
- "name": "serde_device_test_src_lib"
- },
- {
- "name": "serde_test_device_test_src_lib"
- },
- {
- "name": "slab_device_test_src_lib"
- },
- {
- "name": "slab_device_test_tests_serde"
- },
- {
- "name": "slab_device_test_tests_slab"
- },
- {
- "name": "unicode-bidi_device_test_src_lib"
- },
- {
- "name": "unicode-xid_device_test_src_lib"
- },
- {
- "name": "unicode-xid_device_test_tests_exhaustive_tests"
- },
- {
- "name": "url_device_test_src_lib"
- },
- {
- "name": "url_device_test_tests_data"
- },
- {
- "name": "url_device_test_tests_unit"
+ "name": "virtualizationservice_device_test"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index 60842f7..2a35106 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -7,9 +7,9 @@
"std_atomic64"
],
"dependencies": true,
- "vendor_available": true,
"device": true,
"features": "default,derive",
"run": true,
- "tests": true
-}
+ "tests": true,
+ "vendor-available": true
+}
\ No newline at end of file