aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2020-07-16 16:27:45 -0700
committerChih-Hung Hsieh <chh@google.com>2020-07-16 16:33:29 -0700
commit25207b9171391d5b7cb8b99d186845e8aaa95a9f (patch)
treef317ddd76e7997fd97d243338b3818986c906285
parent98db55aa020c7ff8442652aac3f114bd6a654ae6 (diff)
downloadshlex-25207b9171391d5b7cb8b99d186845e8aaa95a9f.tar.gz
Add rust_test and update TEST_MAPPING
Test: atest -c --include-subdirs external/rust/crates Change-Id: I52de09f1a053b4c93436276a1df0b35baf510afe
-rw-r--r--Android.bp11
-rw-r--r--TEST_MAPPING9
2 files changed, 19 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index a80bdb9..df09755 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --dependencies.
+// This file is generated by cargo2android.py --run --dependencies --tests.
rust_library_host {
name: "libshlex",
@@ -6,3 +6,12 @@ rust_library_host {
srcs: ["src/lib.rs"],
edition: "2015",
}
+
+rust_test_host {
+ name: "shlex_host_test_src_lib",
+ crate_name: "shlex",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..8f317d7
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,9 @@
+// Generated by cargo2android.py for tests in Android.bp
+{
+ "presubmit": [
+ {
+ "name": "shlex_host_test_src_lib",
+ "host": true
+ }
+ ]
+}