diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-12-10 02:07:46 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-12-10 02:07:46 +0000 |
commit | e03b367ae4fba9bb37b403ec7124d9987a203cfc (patch) | |
tree | cc45dd741041014d3ed158ff611a4e889ba4209e | |
parent | e9d1c4162c5be24797df13913b89095dbb07ac7d (diff) | |
parent | 117dd39c0f677bf32ce0bfd98b16603830a4caae (diff) | |
download | spin-e03b367ae4fba9bb37b403ec7124d9987a203cfc.tar.gz |
Snap for 7023308 from 117dd39c0f677bf32ce0bfd98b16603830a4caae to sc-release
Change-Id: I5c2f76cf795ffbe12d560219cbd23350da8776a0
-rw-r--r-- | Android.bp | 28 | ||||
-rw-r--r-- | TEST_MAPPING | 12 | ||||
-rw-r--r-- | patches/Android.bp.patch | 20 |
3 files changed, 58 insertions, 2 deletions
@@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --device --run --dependencies. +// This file is generated by cargo2android.py --run --device --dependencies --tests --patch=patches/Android.bp.patch. rust_library { name: "libspin", @@ -8,7 +8,31 @@ rust_library { edition: "2015", features: [ "default", + "std", "ticket_mutex", - "std", ], } + +rust_defaults { + name: "spin_defaults", + crate_name: "spin", + srcs: ["src/lib.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, + edition: "2015", + features: [ + "default", + "std", + "ticket_mutex", + ], +} + +rust_test_host { + name: "spin_host_test_src_lib", + defaults: ["spin_defaults"], +} + +rust_test { + name: "spin_device_test_src_lib", + defaults: ["spin_defaults"], +} diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..6e9bd8c --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,12 @@ +// Generated by cargo2android.py for tests in Android.bp +{ + "presubmit": [ + { + "host": true, + "name": "spin_host_test_src_lib" + }, + { + "name": "spin_device_test_src_lib" + } + ] +} diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch new file mode 100644 index 0000000..db27b2e --- /dev/null +++ b/patches/Android.bp.patch @@ -0,0 +1,20 @@ +diff --git a/Android.bp b/Android.bp +index 96531ab..43db8ef 100644 +--- a/Android.bp ++++ b/Android.bp +@@ -8,6 +8,7 @@ rust_library { + edition: "2015", + features: [ + "default", ++ "std", + "ticket_mutex", + ], + } +@@ -21,6 +22,7 @@ rust_defaults { + edition: "2015", + features: [ + "default", ++ "std", + "ticket_mutex", + ], + } |