Migrate to cargo_embargo. am: 0ee068ce96 am: 9104736c3b

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/hashlink/+/2826414

Change-Id: Ieaa211da8ab72bd4153cdf0ca943f71057eeb56d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index 0920530..986715c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --config cargo2android.json.
+// This file is generated by cargo_embargo.
 // Do not modify this file as changes will be overridden on upgrade.
 
 package {
@@ -37,13 +37,18 @@
     ],
 }
 
-rust_defaults {
-    name: "hashlink_test_defaults",
-    crate_name: "hashlink",
+rust_test {
+    name: "hashlink_test_tests_linked_hash_map",
+    host_supported: true,
+    crate_name: "linked_hash_map",
     cargo_env_compat: true,
     cargo_pkg_version: "0.8.1",
+    srcs: ["tests/linked_hash_map.rs"],
     test_suites: ["general-tests"],
     auto_gen_config: true,
+    test_options: {
+        unit_test: true,
+    },
     edition: "2018",
     rustlibs: [
         "libfxhash",
@@ -54,33 +59,45 @@
 }
 
 rust_test {
-    name: "hashlink_test_tests_linked_hash_map",
-    defaults: ["hashlink_test_defaults"],
-    host_supported: true,
-    srcs: ["tests/linked_hash_map.rs"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
-rust_test {
     name: "hashlink_test_tests_linked_hash_set",
-    defaults: ["hashlink_test_defaults"],
     host_supported: true,
+    crate_name: "linked_hash_set",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.8.1",
     srcs: ["tests/linked_hash_set.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
     test_options: {
         unit_test: true,
     },
+    edition: "2018",
+    rustlibs: [
+        "libfxhash",
+        "libhashbrown",
+        "libhashlink",
+        "libserde_test",
+    ],
 }
 
 rust_test {
     name: "hashlink_test_tests_lru_cache",
-    defaults: ["hashlink_test_defaults"],
     host_supported: true,
+    crate_name: "lru_cache",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.8.1",
     srcs: ["tests/lru_cache.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
     test_options: {
         unit_test: true,
     },
+    edition: "2018",
+    rustlibs: [
+        "libfxhash",
+        "libhashbrown",
+        "libhashlink",
+        "libserde_test",
+    ],
 }
 
 rust_library {
@@ -91,9 +108,7 @@
     cargo_pkg_version: "0.8.1",
     srcs: ["src/lib.rs"],
     edition: "2018",
-    rustlibs: [
-        "libhashbrown",
-    ],
+    rustlibs: ["libhashbrown"],
     apex_available: [
         "//apex_available:platform",
         "//apex_available:anyapex",
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index ff6df50..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "device": true,
-  "run": true,
-  "tests": true
-}
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..9a0a579
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,3 @@
+{
+  "tests": true
+}