Enable tests
Test: atest
-------
x86_64 rand_chacha_host_test_src_lib: Passed: 11, Failed: 0, Ignored: 0, Assumption Failed: 0,
x86 rand_chacha_device_test_src_lib: Passed: 11, Failed: 0, Ignored: 0, Assumption Failed: 0,
Change-Id: Ia392e26e02bd36fa89de642e41ada0f25929716b
diff --git a/Android.bp b/Android.bp
index 57b308b..4e0002c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --device --run --dependencies.
+// This file is generated by cargo2android.py --device --run --dependencies --tests.
// Do not modify this file as changes will be overridden on upgrade.
package {
@@ -42,6 +42,8 @@
name: "librand_chacha",
host_supported: true,
crate_name: "rand_chacha",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.3.1",
srcs: ["src/lib.rs"],
edition: "2018",
features: [
@@ -54,6 +56,35 @@
],
}
-// dependent_library ["feature_list"]
-// ppv-lite86-0.2.10 "simd,std"
-// rand_core-0.6.3
+rust_defaults {
+ name: "rand_chacha_test_defaults",
+ crate_name: "rand_chacha",
+ srcs: ["src/lib.rs"],
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.3.1",
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ rustlibs: [
+ "libppv_lite86",
+ "librand_core",
+ "libserde_json",
+ ],
+}
+
+rust_test_host {
+ name: "rand_chacha_host_test_src_lib",
+ defaults: ["rand_chacha_test_defaults"],
+ test_options: {
+ unit_test: true,
+ },
+}
+
+rust_test {
+ name: "rand_chacha_device_test_src_lib",
+ defaults: ["rand_chacha_test_defaults"],
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 27e89b9..7c2f56b 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -11,12 +11,36 @@
"name": "base64_device_test_tests_helpers"
},
{
+ "name": "crossbeam-deque_device_test_src_lib"
+ },
+ {
+ "name": "crossbeam-deque_device_test_tests_fifo"
+ },
+ {
+ "name": "crossbeam-deque_device_test_tests_injector"
+ },
+ {
+ "name": "crossbeam-deque_device_test_tests_lifo"
+ },
+ {
+ "name": "crossbeam-deque_device_test_tests_steal"
+ },
+ {
"name": "crossbeam-epoch_device_test_src_lib"
},
{
"name": "crossbeam-epoch_device_test_tests_loom"
},
{
+ "name": "crossbeam-queue_device_test_src_lib"
+ },
+ {
+ "name": "crossbeam-queue_device_test_tests_array_queue"
+ },
+ {
+ "name": "crossbeam-queue_device_test_tests_seg_queue"
+ },
+ {
"name": "crossbeam-utils_device_test_src_lib"
},
{
@@ -41,9 +65,18 @@
"name": "keystore2_test"
},
{
+ "name": "keystore2_test_utils_test"
+ },
+ {
"name": "legacykeystore_test"
},
{
+ "name": "mio_device_test_src_lib"
+ },
+ {
+ "name": "rand_chacha_device_test_src_lib"
+ },
+ {
"name": "tokio_device_test_tests__require_full"
},
{