summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2020-12-21 15:45:00 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-21 15:45:00 +0000
commit154778a4d5d7cbce741b6f6a610ec182176b4eef (patch)
tree9df5ed4ec6d3849061ff88b35df48858bb4ac762
parent621a42bf9529d0df9130730f6fb00bea5c8c6eac (diff)
parent766c8d344063a5868a8179a5a86d70294238503c (diff)
downloadmatches-154778a4d5d7cbce741b6f6a610ec182176b4eef.tar.gz
Add Android.bp am: 766c8d3440
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/matches/+/1534340 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ica77e2eb4dd422a4e14e6d1317ecd40c5fcc5fd4
-rw-r--r--Android.bp53
-rw-r--r--TEST_MAPPING19
2 files changed, 72 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..de4144e
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,53 @@
+// This file is generated by cargo2android.py --run --device --dependencies --tests.
+
+rust_library {
+ name: "libmatches",
+ // has rustc warnings
+ host_supported: true,
+ crate_name: "matches",
+ srcs: ["lib.rs"],
+ edition: "2015",
+}
+
+rust_defaults {
+ name: "matches_defaults",
+ crate_name: "matches",
+ // has rustc warnings
+ srcs: ["lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+}
+
+rust_test_host {
+ name: "matches_host_test_lib",
+ defaults: ["matches_defaults"],
+}
+
+rust_test {
+ name: "matches_device_test_lib",
+ defaults: ["matches_defaults"],
+}
+
+rust_defaults {
+ name: "matches_defaults_macro_use_one",
+ crate_name: "macro_use_one",
+ // has rustc warnings
+ srcs: ["tests/macro_use_one.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ edition: "2015",
+ rustlibs: [
+ "libmatches",
+ ],
+}
+
+rust_test_host {
+ name: "matches_host_test_tests_macro_use_one",
+ defaults: ["matches_defaults_macro_use_one"],
+}
+
+rust_test {
+ name: "matches_device_test_tests_macro_use_one",
+ defaults: ["matches_defaults_macro_use_one"],
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..8b581f0
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,19 @@
+// Generated by cargo2android.py for tests in Android.bp
+{
+ "presubmit": [
+ {
+ "host": true,
+ "name": "matches_host_test_lib"
+ },
+ {
+ "name": "matches_device_test_lib"
+ },
+ {
+ "host": true,
+ "name": "matches_host_test_tests_macro_use_one"
+ },
+ {
+ "name": "matches_device_test_tests_macro_use_one"
+ }
+ ]
+}