aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-12-15 18:07:14 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-15 18:07:14 +0000
commit960f9374767bab12b8cda4b6359a3e881337b39f (patch)
tree22f7a78f764de3a178334c63975c00a0c6a11d57
parentfe5e8d6ddc3fca1664a6d46ade9faacf368a2ac3 (diff)
parentc6adea2885c1c4f8d74bebd3fa59aa26bfea7786 (diff)
downloaddowncast-rs-960f9374767bab12b8cda4b6359a3e881337b39f.tar.gz
Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." am: 4a09eb3a4e am: 404f9a55a0 am: 94bb330595 am: c6adea2885
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/downcast-rs/+/1912005 Change-Id: Id2ca207a32fca9d4d9f0755b3d68ed4800d87191
-rw-r--r--Android.bp51
-rw-r--r--TEST_MAPPING71
-rw-r--r--cargo2android.json8
3 files changed, 88 insertions, 42 deletions
diff --git a/Android.bp b/Android.bp
index b716a25..7b32d6f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,14 +24,18 @@ license {
],
}
-rust_defaults {
- name: "downcast-rs_test_defaults",
+rust_test {
+ name: "downcast-rs_test_src_lib",
+ host_supported: true,
crate_name: "downcast_rs",
- srcs: ["src/lib.rs"],
cargo_env_compat: true,
cargo_pkg_version: "1.2.0",
+ srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2015",
features: [
"default",
@@ -39,21 +43,8 @@ rust_defaults {
],
}
-rust_test_host {
- name: "downcast-rs_host_test_src_lib",
- defaults: ["downcast-rs_test_defaults"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
- name: "downcast-rs_device_test_src_lib",
- defaults: ["downcast-rs_test_defaults"],
-}
-
rust_defaults {
- name: "downcast-rs_test_defaults_downcast_rs",
+ name: "downcast-rs_test_defaults",
crate_name: "downcast_rs",
cargo_env_compat: true,
cargo_pkg_version: "1.2.0",
@@ -69,9 +60,10 @@ rust_defaults {
],
}
-rust_test_host {
- name: "downcast-rs_host_test_tests_import_via_macro_use",
- defaults: ["downcast-rs_test_defaults_downcast_rs"],
+rust_test {
+ name: "downcast-rs_test_tests_import_via_macro_use",
+ defaults: ["downcast-rs_test_defaults"],
+ host_supported: true,
srcs: ["tests/import_via_macro_use.rs"],
test_options: {
unit_test: true,
@@ -79,30 +71,18 @@ rust_test_host {
}
rust_test {
- name: "downcast-rs_device_test_tests_import_via_macro_use",
- defaults: ["downcast-rs_test_defaults_downcast_rs"],
- srcs: ["tests/import_via_macro_use.rs"],
-}
-
-rust_test_host {
- name: "downcast-rs_host_test_tests_use_via_namespace",
- defaults: ["downcast-rs_test_defaults_downcast_rs"],
+ name: "downcast-rs_test_tests_use_via_namespace",
+ defaults: ["downcast-rs_test_defaults"],
+ host_supported: true,
srcs: ["tests/use_via_namespace.rs"],
test_options: {
unit_test: true,
},
}
-rust_test {
- name: "downcast-rs_device_test_tests_use_via_namespace",
- defaults: ["downcast-rs_test_defaults_downcast_rs"],
- srcs: ["tests/use_via_namespace.rs"],
-}
-
rust_library {
name: "libdowncast_rs",
host_supported: true,
- vendor_available: true,
crate_name: "downcast_rs",
cargo_env_compat: true,
cargo_pkg_version: "1.2.0",
@@ -118,5 +98,6 @@ rust_library {
"com.android.uwb",
"com.android.virt",
],
+ vendor_available: true,
min_sdk_version: "29",
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 25eb970..8b3fb15 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,13 +2,78 @@
{
"presubmit": [
{
- "name": "downcast-rs_device_test_src_lib"
+ "name": "authfs_device_test_src_lib"
},
{
- "name": "downcast-rs_device_test_tests_import_via_macro_use"
+ "name": "downcast-rs_test_src_lib"
},
{
- "name": "downcast-rs_device_test_tests_use_via_namespace"
+ "name": "downcast-rs_test_tests_import_via_macro_use"
+ },
+ {
+ "name": "downcast-rs_test_tests_use_via_namespace"
+ },
+ {
+ "name": "keystore2_km_compat_test"
+ },
+ {
+ "name": "keystore2_test"
+ },
+ {
+ "name": "legacykeystore_test"
+ },
+ {
+ "name": "libbinder_rs-internal_test"
+ },
+ {
+ "name": "microdroid_manager_test"
+ },
+ {
+ "name": "rustBinderTest"
+ },
+ {
+ "name": "rustBinderTestService"
+ },
+ {
+ "name": "virtualizationservice_device_test"
+ }
+ ],
+ "presubmit-rust": [
+ {
+ "name": "authfs_device_test_src_lib"
+ },
+ {
+ "name": "downcast-rs_test_src_lib"
+ },
+ {
+ "name": "downcast-rs_test_tests_import_via_macro_use"
+ },
+ {
+ "name": "downcast-rs_test_tests_use_via_namespace"
+ },
+ {
+ "name": "keystore2_km_compat_test"
+ },
+ {
+ "name": "keystore2_test"
+ },
+ {
+ "name": "legacykeystore_test"
+ },
+ {
+ "name": "libbinder_rs-internal_test"
+ },
+ {
+ "name": "microdroid_manager_test"
+ },
+ {
+ "name": "rustBinderTest"
+ },
+ {
+ "name": "rustBinderTestService"
+ },
+ {
+ "name": "virtualizationservice_device_test"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index b8faecf..d5077e9 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -6,9 +6,9 @@
"com.android.virt"
],
"dependencies": true,
- "vendor_available": true,
"device": true,
- "min_sdk_version": "29",
+ "min-sdk-version": "29",
"run": true,
- "tests": true
-}
+ "tests": true,
+ "vendor-available": true
+} \ No newline at end of file