aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2020-06-17 23:19:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-17 23:19:46 +0000
commit2937fa587dbf9c00f160f52db313f71cbd4bd706 (patch)
tree927c3fff45b9c3166252ef7251178aa2a9d7a07d
parent47a199fdece279a72682d3ac7a68acc264f787fd (diff)
parent0aa6809418c1ca3685be995ee316eff900aade40 (diff)
downloadslab-2937fa587dbf9c00f160f52db313f71cbd4bd706.tar.gz
Separate host and device tests am: 0aa6809418
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/slab/+/1337255 Change-Id: I9ffcf851c12cc1b428431d65eff4c5f01fd66a65
-rw-r--r--Android.bp40
-rw-r--r--TEST_MAPPING12
2 files changed, 41 insertions, 11 deletions
diff --git a/Android.bp b/Android.bp
index 7f627cd..1373a19 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,7 @@
// This file is generated by cargo2android.py --run --device --tests.
+// Manually split host and device tests,
+// and link in static libraries for device tests.
+// But, device tests cannot link with both libstd.static and libslab.
rust_library_rlib {
name: "libslab",
@@ -8,9 +11,8 @@ rust_library_rlib {
edition: "2015",
}
-rust_test {
- name: "slab_tests_slab",
- host_supported: true,
+rust_test_host {
+ name: "slab_host_tests_slab",
crate_name: "slab",
srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
@@ -19,8 +21,21 @@ rust_test {
}
rust_test {
- name: "slab_tests_slab1",
- host_supported: true,
+ name: "slab_device_tests_slab",
+ crate_name: "slab",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+ rlibs: [
+ "libstd.static",
+ "libtest.static",
+ "libterm.static",
+ ],
+}
+
+rust_test_host {
+ name: "slab_host_tests_slab1",
crate_name: "slab",
srcs: ["tests/slab.rs"],
test_suites: ["general-tests"],
@@ -30,3 +45,18 @@ rust_test {
"libslab",
],
}
+
+// rust_test {
+// name: "slab_device_tests_slab1",
+// crate_name: "slab",
+// srcs: ["tests/slab.rs"],
+// test_suites: ["general-tests"],
+// auto_gen_config: true,
+// edition: "2015",
+// rlibs: [
+// "libslab",
+// "libstd.static",
+// "libtest.static",
+// "libterm.static",
+// ],
+// }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index acd7705..61049c1 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,18 +1,18 @@
{
"presubmit": [
{
- "name": "slab_tests_slab",
+ "name": "slab_host_tests_slab",
"host": true
},
{
- "name": "slab_tests_slab"
+ "name": "slab_device_tests_slab"
},
{
- "name": "slab_tests_slab1",
+ "name": "slab_host_tests_slab1",
"host": true
- },
- {
- "name": "slab_tests_slab1"
}
+ //{
+ // "name": "slab_device_tests_slab1"
+ //}
]
}