summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2020-12-21 16:12:10 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-21 16:12:10 +0000
commit4d0964d30dabcf310e881ff5f9a35073f264119a (patch)
tree9df5ed4ec6d3849061ff88b35df48858bb4ac762
parent0817547637c001c00dda06e591252dd77fe8ffaf (diff)
parent154778a4d5d7cbce741b6f6a610ec182176b4eef (diff)
downloadmatches-4d0964d30dabcf310e881ff5f9a35073f264119a.tar.gz
Add Android.bp am: 766c8d3440 am: 154778a4d5
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/matches/+/1534340 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia6f739872e462a626ce8e364725887be127b289a
-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"
+ }
+ ]
+}