Enable tests that depend on bincode

The bincode crate was imported in b/330683225, so we can now enable unit tests for crates which uses it as a dev-dependency.

Bug: 333560480
Flag: TEST_ONLY
Test: atest --host parking_lot_test_src_lib parking_lot_test_tests_issue_203
Change-Id: I1be58dd4cf947cef66f66fbc28ced017597205e6
diff --git a/Android.bp b/Android.bp
index 73c14ee..1f66241 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,7 @@
 // This file is generated by cargo_embargo.
-// Do not modify this file as changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
+// Content before the first "rust_*" or "genrule" module is preserved.
 
 package {
     default_applicable_licenses: ["external_rust_crates_parking_lot_license"],
@@ -59,3 +61,48 @@
     vendor_available: true,
     min_sdk_version: "29",
 }
+
+rust_test {
+    name: "parking_lot_test_src_lib",
+    host_supported: true,
+    crate_name: "parking_lot",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.12.1",
+    srcs: ["src/lib.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
+    test_options: {
+        unit_test: true,
+    },
+    edition: "2018",
+    features: ["default"],
+    rustlibs: [
+        "libbincode",
+        "liblock_api",
+        "libparking_lot_core",
+        "librand",
+    ],
+}
+
+rust_test {
+    name: "parking_lot_test_tests_issue_203",
+    host_supported: true,
+    crate_name: "issue_203",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.12.1",
+    srcs: ["tests/issue_203.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
+    test_options: {
+        unit_test: true,
+    },
+    edition: "2018",
+    features: ["default"],
+    rustlibs: [
+        "libbincode",
+        "liblock_api",
+        "libparking_lot",
+        "libparking_lot_core",
+        "librand",
+    ],
+}
diff --git a/cargo_embargo.json b/cargo_embargo.json
index 85d370f..c9aea70 100644
--- a/cargo_embargo.json
+++ b/cargo_embargo.json
@@ -5,5 +5,6 @@
     "com.android.virt"
   ],
   "min_sdk_version": "29",
-  "run_cargo": false
+  "run_cargo": false,
+  "tests": true
 }