aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:12:56 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:12:56 +0000
commitf887e8e2139141cbaa1a748dbbcc61e4957d50a2 (patch)
tree37e64829e64fd7532ccee5a75bc46af2164dc5c2
parentdc83778ae30ab88216912b6417cffffc125bbb16 (diff)
parent712738507c95237f69c0cf56e7d7e5282c2db9b8 (diff)
downloadtinytemplate-aml_net_331812010.tar.gz
Change-Id: I8ffa0b37b71829b28ff186318ce998d1c0579d05
-rw-r--r--Android.bp29
-rw-r--r--TEST_MAPPING24
-rw-r--r--cargo2android.json5
3 files changed, 52 insertions, 6 deletions
diff --git a/Android.bp b/Android.bp
index 290f0b5..850e6fd 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --dependencies.
+// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
@@ -41,6 +41,8 @@ rust_library {
name: "libtinytemplate",
host_supported: true,
crate_name: "tinytemplate",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.2.1",
srcs: ["src/lib.rs"],
edition: "2015",
rustlibs: [
@@ -49,8 +51,23 @@ rust_library {
],
}
-// dependent_library ["feature_list"]
-// itoa-0.4.7 "default,std"
-// ryu-1.0.5
-// serde-1.0.125 "default,std"
-// serde_json-1.0.64 "default,std"
+rust_test {
+ name: "tinytemplate_test_src_lib",
+ host_supported: true,
+ crate_name: "tinytemplate",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.2.1",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
+ edition: "2015",
+ rustlibs: [
+ "libcriterion",
+ "libserde",
+ "libserde_json",
+ ],
+ proc_macros: ["libserde_derive"],
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..9a60ded
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,24 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+ "imports": [
+ {
+ "path": "external/rust/crates/base64"
+ },
+ {
+ "path": "external/rust/crates/tinyvec"
+ },
+ {
+ "path": "external/rust/crates/unicode-xid"
+ }
+ ],
+ "presubmit": [
+ {
+ "name": "tinytemplate_test_src_lib"
+ }
+ ],
+ "presubmit-rust": [
+ {
+ "name": "tinytemplate_test_src_lib"
+ }
+ ]
+}
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..d36fb44
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,5 @@
+{
+ "device": true,
+ "run": true,
+ "tests": true
+} \ No newline at end of file