Update Android.bp files to not use test_per_src.
Each rust_test module corresponds to a single test binary now.
Bug: 158500462
Test: Affected test modules build.
Change-Id: Ib6fb6c87ad3093580516724cf6f34c8d29fb220e
diff --git a/Android.bp b/Android.bp
index 240ce06..d948226 100644
--- a/Android.bp
+++ b/Android.bp
@@ -19,15 +19,9 @@
compile_multilib: "first", // added
}
-rust_test_host {
+rust_defaults {
name: "proc-macro2_tests",
crate_name: "proc_macro2",
- srcs: [
- "tests/comments.rs",
- "tests/features.rs",
- "tests/marker.rs",
- "tests/test.rs",
- ],
test_suites: ["general-tests"],
auto_gen_config: true,
edition: "2018",
@@ -47,6 +41,38 @@
}
rust_test_host {
+ name: "proc-macro2_tests_comments",
+ defaults: ["proc-macro2_tests"],
+ srcs: [
+ "tests/comments.rs",
+ ],
+}
+
+rust_test_host {
+ name: "proc-macro2_tests_features",
+ defaults: ["proc-macro2_tests"],
+ srcs: [
+ "tests/features.rs",
+ ],
+}
+
+rust_test_host {
+ name: "proc-macro2_tests_marker",
+ defaults: ["proc-macro2_tests"],
+ srcs: [
+ "tests/marker.rs",
+ ],
+}
+
+rust_test_host {
+ name: "proc-macro2_tests_test",
+ defaults: ["proc-macro2_tests"],
+ srcs: [
+ "tests/test.rs",
+ ],
+}
+
+rust_test_host {
name: "proc-macro2_tests_proc_macro2",
crate_name: "proc_macro2",
srcs: ["src/lib.rs"],