aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2020-07-21 21:28:29 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-21 21:28:29 +0000
commit34f32326282ec0ae95d3962858dc5a33b4dceacd (patch)
tree2efd551d11aec2a5673d4af57c2db5bea082dc52
parent7039884860c24b4b029d3af21c5c86bbbe40d115 (diff)
parentac3c1f1a72171d9c39076caa58826c8acb377b74 (diff)
downloadunicode-width-34f32326282ec0ae95d3962858dc5a33b4dceacd.tar.gz
Add rust_test and update TEST_MAPPING am: ad5b93b26c am: 71c283f243 am: 3bfefd5d00 am: de7e3eb603 am: ac3c1f1a72
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/unicode-width/+/1365107 Change-Id: I179ecd5ba66354936029e76a86bcb37659f4c01f
-rw-r--r--Android.bp27
-rw-r--r--TEST_MAPPING12
2 files changed, 38 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 441c7ff..a1e6550 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --dependencies --device.
+// This file is generated by cargo2android.py --run --dependencies --device --tests.
rust_library {
name: "libunicode_width",
@@ -11,3 +11,28 @@ rust_library {
"default",
],
}
+
+rust_defaults {
+ name: "unicode-width_defaults",
+ crate_name: "unicode_width",
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+ features: [
+ "default",
+ ],
+}
+
+rust_test_host {
+ name: "unicode-width_host_test_src_lib",
+ defaults: ["unicode-width_defaults"],
+ // has rustc warnings
+ srcs: ["src/lib.rs"],
+}
+
+rust_test {
+ name: "unicode-width_device_test_src_lib",
+ defaults: ["unicode-width_defaults"],
+ // has rustc warnings
+ srcs: ["src/lib.rs"],
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..df5b82f
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,12 @@
+// Generated by cargo2android.py for tests in Android.bp
+{
+ "presubmit": [
+ {
+ "name": "unicode-width_host_test_src_lib",
+ "host": true
+ },
+ {
+ "name": "unicode-width_device_test_src_lib"
+ }
+ ]
+}