aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-08 01:17:33 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-08 01:17:33 +0000
commitb25935f90b6b9dce6d448b480bd009719c3367a0 (patch)
treee917ad15bdd14975b7cda220330ca19b3d0fdf5f
parent122c4f8c8653716b05b9aac2a66ec2371e80f98f (diff)
parent9c19607bfe316ee5fbb16c95f69199fe38f83b89 (diff)
downloadfutures-executor-b25935f90b6b9dce6d448b480bd009719c3367a0.tar.gz
Snap for 8807532 from 9c19607bfe316ee5fbb16c95f69199fe38f83b89 to udc-release
Change-Id: I3139b1fe60f16071e976128b0962d5ec360120b3
-rw-r--r--Android.bp55
-rw-r--r--Cargo.toml1
-rw-r--r--TEST_MAPPING32
-rw-r--r--cargo2android.json3
-rw-r--r--patches/Cargo.toml.patch12
5 files changed, 72 insertions, 31 deletions
diff --git a/Android.bp b/Android.bp
index ebd9f28..efb0cdc 100644
--- a/Android.bp
+++ b/Android.bp
@@ -39,6 +39,61 @@ license {
],
}
+rust_test {
+ name: "futures-executor_test_src_lib",
+ host_supported: true,
+ crate_name: "futures_executor",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.3.21",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
+ edition: "2018",
+ features: [
+ "num_cpus",
+ "std",
+ "thread-pool",
+ ],
+ rustlibs: [
+ "libfutures",
+ "libfutures_core",
+ "libfutures_task",
+ "libfutures_util",
+ "libnum_cpus",
+ ],
+}
+
+rust_test {
+ name: "futures-executor_test_tests_local_pool",
+ host_supported: true,
+ crate_name: "local_pool",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.3.21",
+ srcs: ["tests/local_pool.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
+ edition: "2018",
+ features: [
+ "num_cpus",
+ "std",
+ "thread-pool",
+ ],
+ rustlibs: [
+ "libfutures",
+ "libfutures_core",
+ "libfutures_executor",
+ "libfutures_task",
+ "libfutures_util",
+ "libnum_cpus",
+ ],
+}
+
rust_library {
name: "libfutures_executor",
host_supported: true,
diff --git a/Cargo.toml b/Cargo.toml
index 4b79bba..bf8fbf2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,6 +45,7 @@ version = "1.8.0"
optional = true
[dev-dependencies]
+futures = "0.3.21"
[features]
default = ["std"]
diff --git a/TEST_MAPPING b/TEST_MAPPING
index e2df61d..d8f525d 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,39 +1,11 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
{
- "imports": [
- {
- "path": "external/rust/crates/anyhow"
- },
- {
- "path": "external/rust/crates/tokio"
- }
- ],
"presubmit": [
{
- "name": "ZipFuseTest"
- },
- {
- "name": "authfs_device_test_src_lib"
- },
- {
- "name": "doh_unit_test"
- },
- {
- "name": "virtualizationservice_device_test"
- }
- ],
- "presubmit-rust": [
- {
- "name": "ZipFuseTest"
- },
- {
- "name": "authfs_device_test_src_lib"
- },
- {
- "name": "doh_unit_test"
+ "name": "futures-executor_test_src_lib"
},
{
- "name": "virtualizationservice_device_test"
+ "name": "futures-executor_test_tests_local_pool"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index da40e17..0d3c48e 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -9,5 +9,6 @@
"device": true,
"features": "thread-pool",
"min-sdk-version": "29",
- "run": true
+ "run": true,
+ "tests": true
}
diff --git a/patches/Cargo.toml.patch b/patches/Cargo.toml.patch
new file mode 100644
index 0000000..2dbe263
--- /dev/null
+++ b/patches/Cargo.toml.patch
@@ -0,0 +1,12 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 4b79bba..bf8fbf2 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -45,6 +45,7 @@ version = "1.8.0"
+ optional = true
+
+ [dev-dependencies]
++futures = "0.3.21"
+
+ [features]
+ default = ["std"]