Merge "Add auto_gen_config and TEST_MAPPING."
diff --git a/Android.bp b/Android.bp
index df5e2a6..3cf41a9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,35 +20,16 @@
 }
 
 rust_test_host {
-    name: "proc-macro2_test_src_lib",
-    crate_name: "proc_macro2",
-    srcs: ["src/lib.rs"],
-    relative_install_path: "rust/proc-macro2",
-    edition: "2018",
-    features: [
-        "default",
-        "proc-macro",
-    ],
-    flags: [
-        "--cfg proc_macro_span",
-        "--cfg use_proc_macro",
-        "--cfg wrap_proc_macro",
-    ],
-    rlibs: [
-        "libquote",
-        "libunicode_xid",
-    ],
-}
-
-rust_test_host {
-    name: "proc-macro2_tests_test",
+    name: "proc-macro2_tests",
     crate_name: "proc_macro2",
     srcs: [
         "tests/features.rs",
         "tests/marker.rs",
         "tests/test.rs",
     ],
-    relative_install_path: "rust/proc-macro2",
+    relative_install_path: "proc-macro2_tests",
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
     edition: "2018",
     features: [
         "default",
@@ -65,3 +46,26 @@
         "libunicode_xid",
     ],
 }
+
+rust_test_host {
+    name: "proc-macro2_tests_proc_macro2",
+    crate_name: "proc_macro2",
+    srcs: ["src/lib.rs"],
+    relative_install_path: "proc-macro2_tests",
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
+    edition: "2018",
+    features: [
+        "default",
+        "proc-macro",
+    ],
+    flags: [
+        "--cfg proc_macro_span",
+        "--cfg use_proc_macro",
+        "--cfg wrap_proc_macro",
+    ],
+    rlibs: [
+        "libquote",
+        "libunicode_xid",
+    ],
+}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..acd1a0c
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,24 @@
+{
+  "presubmit": [
+    {
+      "name": "proc-macro2_tests_proc_macro2",
+      "host": true
+    },
+    {
+      "name": "proc-macro2_tests_features",
+      "host": true
+    },
+    {
+      "name": "proc-macro2_tests_marker",
+      "host": true
+    },
+    {
+      "name": "proc-macro2_tests_test",
+      "host": true
+    },
+    {
+      "name": "proc-macro2_tests_marker",
+      "host": true
+    }
+  ]
+}