summaryrefslogtreecommitdiff
path: root/rust/testing.go
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2020-04-09 09:32:15 -0400
committerIvan Lozano <ivanlozano@google.com>2020-04-23 09:39:34 -0400
commit2f15bae3369f6abbe1a8112bb294b62a45709ee3 (patch)
tree120d59a570bf33aedcdac6db14ba2f57dc927ac2 /rust/testing.go
parent14f42d34af0024a8759ea1eb8d3f40e84492d4a6 (diff)
Clean up rust tests.
The list of required deps for testing is a lot shorter as we no longer include as many prebuilt libraries and our list of stdlibs is much shorter. Remove the libraries we no longer need, and add the non-prebuilt libstd and libtest to the deps generated for every test. Bug: 153463188 Test: Soong tests pass. Change-Id: I94f7b514797ab8d6aedb543ea6afdb07611b7293
Diffstat (limited to 'rust/testing.go')
-rw-r--r--rust/testing.go65
1 files changed, 25 insertions, 40 deletions
diff --git a/rust/testing.go b/rust/testing.go
index f9adec828..c3a462553 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -22,51 +22,11 @@ import (
func GatherRequiredDepsForTest() string {
bp := `
rust_prebuilt_dylib {
- name: "libarena_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
- name: "libfmt_macros_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
- name: "libgraphviz_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
- name: "libserialize_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
name: "libstd_x86_64-unknown-linux-gnu",
srcs: [""],
host_supported: true,
}
rust_prebuilt_dylib {
- name: "libsyntax_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
- name: "libsyntax_ext_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
- name: "libsyntax_pos_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
- name: "libterm_x86_64-unknown-linux-gnu",
- srcs: [""],
- host_supported: true,
- }
- rust_prebuilt_dylib {
name: "libtest_x86_64-unknown-linux-gnu",
srcs: [""],
host_supported: true,
@@ -81,6 +41,31 @@ func GatherRequiredDepsForTest() string {
nocrt: true,
system_shared_libs: [],
}
+ rust_library_dylib {
+ name: "libstd",
+ crate_name: "std",
+ srcs: ["foo.rs"],
+ no_stdlibs: true,
+ }
+ rust_library_rlib {
+ name: "libstd.static",
+ crate_name: "std",
+ srcs: ["foo.rs"],
+ no_stdlibs: true,
+ }
+ rust_library_dylib {
+ name: "libtest",
+ crate_name: "test",
+ srcs: ["foo.rs"],
+ no_stdlibs: true,
+ }
+ rust_library_rlib {
+ name: "libtest.static",
+ crate_name: "test",
+ srcs: ["foo.rs"],
+ no_stdlibs: true,
+ }
+
` + cc.GatherRequiredDepsForTest(android.NoOsType)
return bp
}