aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:01:04 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:01:04 +0000
commit30a52a0bee64eff0510cea828777890ad54ee6c0 (patch)
tree16c8bcd0e6c4a04de4f499a8dd993426162e7fb0
parent10dd75206e3b45bb20aa13e9427f29c4d05d9a4c (diff)
parentf4ba8050f0d04c9a482cfeb99da26825a788b576 (diff)
downloadnum-traits-android13-mainline-resolv-release.tar.gz
Change-Id: I8e8e636b9fe46e1f0599da8f6c0b5f3f5facb378
-rw-r--r--Android.bp54
-rw-r--r--TEST_MAPPING82
-rw-r--r--cargo2android.json9
3 files changed, 108 insertions, 37 deletions
diff --git a/Android.bp b/Android.bp
index 4a33246..e712fd7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,6 +41,8 @@ rust_library {
name: "libnum_traits",
host_supported: true,
crate_name: "num_traits",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.14",
srcs: ["src/lib.rs"],
edition: "2015",
features: [
@@ -53,16 +55,27 @@ rust_library {
],
apex_available: [
"//apex_available:platform",
+ "com.android.bluetooth",
+ "com.android.compos",
+ "com.android.uwb",
"com.android.virt",
],
+ vendor_available: true,
+ min_sdk_version: "29",
}
-rust_defaults {
- name: "num-traits_defaults",
+rust_test {
+ name: "num-traits_test_src_lib",
+ host_supported: true,
crate_name: "num_traits",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.14",
srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2015",
features: [
"default",
@@ -74,25 +87,18 @@ rust_defaults {
],
}
-rust_test_host {
- name: "num-traits_host_test_src_lib",
- defaults: ["num-traits_defaults"],
- test_options: {
- unit_test: true,
- },
-}
-
rust_test {
- name: "num-traits_device_test_src_lib",
- defaults: ["num-traits_defaults"],
-}
-
-rust_defaults {
- name: "num-traits_defaults_cast",
+ name: "num-traits_test_tests_cast",
+ host_supported: true,
crate_name: "cast",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.14",
srcs: ["tests/cast.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2015",
features: [
"default",
@@ -106,19 +112,3 @@ rust_defaults {
"libnum_traits",
],
}
-
-rust_test_host {
- name: "num-traits_host_test_tests_cast",
- defaults: ["num-traits_defaults_cast"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
- name: "num-traits_device_test_tests_cast",
- defaults: ["num-traits_defaults_cast"],
-}
-
-// dependent_library ["feature_list"]
-// autocfg-1.0.1
diff --git a/TEST_MAPPING b/TEST_MAPPING
index aa4ba0b..cb7008a 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,11 +1,87 @@
-// Generated by cargo2android.py for tests in Android.bp
+// Generated by update_crate_tests.py for tests that depend on this crate.
{
+ "imports": [
+ {
+ "path": "external/rust/crates/base64"
+ },
+ {
+ "path": "external/rust/crates/gdbstub_arch"
+ },
+ {
+ "path": "external/rust/crates/num-bigint"
+ },
+ {
+ "path": "external/rust/crates/num-integer"
+ },
+ {
+ "path": "external/rust/crates/oid-registry"
+ },
+ {
+ "path": "external/rust/crates/tinytemplate"
+ },
+ {
+ "path": "external/rust/crates/tinyvec"
+ },
+ {
+ "path": "external/rust/crates/unicode-xid"
+ }
+ ],
"presubmit": [
{
- "name": "num-traits_device_test_src_lib"
+ "name": "apkdmverity.test"
+ },
+ {
+ "name": "libapkverify.integration_test"
+ },
+ {
+ "name": "libapkverify.test"
+ },
+ {
+ "name": "libcert_request_validator_tests"
+ },
+ {
+ "name": "libidsig.test"
+ },
+ {
+ "name": "microdroid_manager_test"
+ },
+ {
+ "name": "num-traits_test_src_lib"
+ },
+ {
+ "name": "num-traits_test_tests_cast"
+ },
+ {
+ "name": "virtualizationservice_device_test"
+ }
+ ],
+ "presubmit-rust": [
+ {
+ "name": "apkdmverity.test"
+ },
+ {
+ "name": "libapkverify.integration_test"
+ },
+ {
+ "name": "libapkverify.test"
+ },
+ {
+ "name": "libcert_request_validator_tests"
+ },
+ {
+ "name": "libidsig.test"
+ },
+ {
+ "name": "microdroid_manager_test"
+ },
+ {
+ "name": "num-traits_test_src_lib"
+ },
+ {
+ "name": "num-traits_test_tests_cast"
},
{
- "name": "num-traits_device_test_tests_cast"
+ "name": "virtualizationservice_device_test"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index ac56e26..f7c1ca1 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,10 +1,15 @@
{
"apex-available": [
"//apex_available:platform",
+ "com.android.bluetooth",
+ "com.android.compos",
+ "com.android.uwb",
"com.android.virt"
],
"dependencies": true,
"device": true,
+ "min-sdk-version": "29",
"run": true,
- "tests": true
-} \ No newline at end of file
+ "tests": true,
+ "vendor-available": true
+}