Snap for 8005954 from 88a5b4225f3af7b4deb840baa1fc7569b717d0bf to sdk-release

Change-Id: Ibc792b85e67012fa8a4390f3b573e5c2175fddaf
diff --git a/Android.bp b/Android.bp
index 0bbcd4d..dc3b197 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,8 +1,6 @@
 // This file is generated by cargo2android.py --config cargo2android.json.
 // Do not modify this file as changes will be overridden on upgrade.
 
-
-
 package {
     default_applicable_licenses: ["external_rust_crates_webpki_license"],
 }
@@ -37,6 +35,8 @@
     name: "libwebpki",
     host_supported: true,
     crate_name: "webpki",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.22.0",
     srcs: ["src/lib.rs"],
     edition: "2018",
     features: [
@@ -49,12 +49,18 @@
     ],
 }
 
-rust_defaults {
-    name: "webpki_test_defaults",
+rust_test {
+    name: "webpki_test_src_lib",
+    host_supported: true,
     crate_name: "webpki",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.22.0",
     srcs: ["src/lib.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
+    test_options: {
+        unit_test: true,
+    },
     edition: "2018",
     features: [
         "alloc",
@@ -67,22 +73,11 @@
     ],
 }
 
-rust_test_host {
-    name: "webpki_host_test_src_lib",
-    defaults: ["webpki_test_defaults"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
-rust_test {
-    name: "webpki_device_test_src_lib",
-    defaults: ["webpki_test_defaults"],
-}
-
 rust_defaults {
-    name: "webpki_test_defaults_webpki",
+    name: "webpki_test_defaults",
     crate_name: "webpki",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.22.0",
     test_suites: ["general-tests"],
     auto_gen_config: true,
     edition: "2018",
@@ -98,9 +93,10 @@
     ],
 }
 
-rust_test_host {
-    name: "webpki_host_test_tests_dns_name_tests",
-    defaults: ["webpki_test_defaults_webpki"],
+rust_test {
+    name: "webpki_test_tests_dns_name_tests",
+    defaults: ["webpki_test_defaults"],
+    host_supported: true,
     srcs: ["tests/dns_name_tests.rs"],
     test_options: {
         unit_test: true,
@@ -108,22 +104,11 @@
 }
 
 rust_test {
-    name: "webpki_device_test_tests_dns_name_tests",
-    defaults: ["webpki_test_defaults_webpki"],
-    srcs: ["tests/dns_name_tests.rs"],
-}
-
-rust_test_host {
-    name: "webpki_host_test_tests_integration",
-    defaults: ["webpki_test_defaults_webpki"],
+    name: "webpki_test_tests_integration",
+    defaults: ["webpki_test_defaults"],
+    host_supported: true,
     srcs: ["tests/integration.rs"],
     test_options: {
         unit_test: true,
     },
 }
-
-rust_test {
-    name: "webpki_device_test_tests_integration",
-    defaults: ["webpki_test_defaults_webpki"],
-    srcs: ["tests/integration.rs"],
-}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index aaa4d17..66818d3 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,13 +2,24 @@
 {
   "presubmit": [
     {
-      "name": "webpki_device_test_src_lib"
+      "name": "webpki_test_src_lib"
     },
     {
-      "name": "webpki_device_test_tests_dns_name_tests"
+      "name": "webpki_test_tests_dns_name_tests"
     },
     {
-      "name": "webpki_device_test_tests_integration"
+      "name": "webpki_test_tests_integration"
+    }
+  ],
+  "presubmit-rust": [
+    {
+      "name": "webpki_test_src_lib"
+    },
+    {
+      "name": "webpki_test_tests_dns_name_tests"
+    },
+    {
+      "name": "webpki_test_tests_integration"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
index 8a00514..b1863fd 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,7 +1,6 @@
 {
-    "device": true,
-    "features": "alloc,std",
-    "run": true,
-    "tests": true
-}
-
+  "device": true,
+  "features": "alloc,std",
+  "run": true,
+  "tests": true
+}
\ No newline at end of file