Add rust_test and update TEST_MAPPING
Test: atest -c --include-subdirs external/rust/crates
Change-Id: Ic38f234b8557ec5fc9ef424c6e6766c6e0dc4f29
diff --git a/Android.bp b/Android.bp
index 2e2d538..a38d4e2 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: "libregex_syntax",
@@ -17,3 +17,23 @@
"unicode-segment",
],
}
+
+rust_test_host {
+ name: "regex-syntax_host_test_src_lib",
+ crate_name: "regex_syntax",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+ features: [
+ "default",
+ "unicode",
+ "unicode-age",
+ "unicode-bool",
+ "unicode-case",
+ "unicode-gencat",
+ "unicode-perl",
+ "unicode-script",
+ "unicode-segment",
+ ],
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..2506375
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,9 @@
+// Generated by cargo2android.py for tests in Android.bp
+{
+ "presubmit": [
+ {
+ "name": "regex-syntax_host_test_src_lib",
+ "host": true
+ }
+ ]
+}