Merge ac378d131ef599430e78d4eb5a2d611c0c637f8c on remote branch

Change-Id: Idd00bd425a3a38eea19a3faf48304cf4015d384b
diff --git a/Android.bp b/Android.bp
index 9db6e2d..71ece12 100644
--- a/Android.bp
+++ b/Android.bp
@@ -57,32 +57,21 @@
     ],
 }
 
-rust_defaults {
-    name: "shared_library_test_defaults",
+rust_test {
+    name: "shared_library_test_src_lib",
+    host_supported: true,
     crate_name: "shared_library",
-    srcs: ["src/lib.rs"],
     cargo_env_compat: true,
     cargo_pkg_version: "0.1.9",
+    srcs: ["src/lib.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
+    test_options: {
+        unit_test: false,
+    },
     edition: "2015",
     rustlibs: [
         "liblazy_static",
         "liblibc",
     ],
 }
-
-rust_test_host {
-    name: "shared_library_host_test_src_lib",
-    defaults: ["shared_library_test_defaults"],
-    // Manually disabled as these tests depend on specific graphics libraries
-    // being available on the machine running the tests.
-    test_options: {
-        unit_test: false,
-    },
-}
-
-rust_test {
-    name: "shared_library_device_test_src_lib",
-    defaults: ["shared_library_test_defaults"],
-}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index cf54784..f439cf8 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,13 +1,8 @@
 // Generated by update_crate_tests.py for tests that depend on this crate.
 {
-  "presubmit": [
-    // Manually disabled as these tests depend on specific graphics libraries
-    // being available on the machine running the tests.
-    //{
-    //  "name": "shared_library_device_test_src_lib"
-    //},
-    //{
-    //  "name": "vulkano_device_test_src_lib"
-    //}
+  "imports": [
+    {
+      "path": "external/rust/crates/vulkano"
+    }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
index 9a0499e..6e68088 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -4,7 +4,7 @@
     "com.android.virt"
   ],
   "device": true,
+  "no-presubmit": true,
   "run": true,
-  "tests": true,
-  "patch": "patches/Android.bp.patch"
+  "tests": true
 }
\ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
deleted file mode 100644
index 7eb1f13..0000000
--- a/patches/Android.bp.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/Android.bp b/Android.bp
-index 3e82eff..550133f 100644
---- a/Android.bp
-+++ b/Android.bp
-@@ -35,8 +35,10 @@ rust_defaults {
- rust_test_host {
-     name: "shared_library_host_test_src_lib",
-     defaults: ["shared_library_test_defaults"],
-+    // Manually disabled as these tests depend on specific graphics libraries
-+    // being available on the machine running the tests.
-     test_options: {
--        unit_test: true,
-+        unit_test: false,
-     },
- }
-