Convert TestClasspath to test fixtures
The main complication with this change was that many of the tests check
paths that are provided by the default java modules. The location of
them is different in the test fixtures that it is when using
testConfig() and so the test needed to be changed.
Bug: 182638834
Test: m nothing
Change-Id: I6d325dbd3ba39e5de7e53c576d7cfe07bd95a965
diff --git a/java/java_test.go b/java/java_test.go
index 2eb7241..5330556 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -247,7 +247,14 @@
// defaultModuleToPath constructs a path to the turbine generate jar for a default test module that
// is defined in PrepareForIntegrationTestWithJava
func defaultModuleToPath(name string) string {
- return filepath.Join(buildDir, ".intermediates", defaultJavaDir, name, "android_common", "turbine-combined", name+".jar")
+ switch {
+ case name == `""`:
+ return name
+ case strings.HasSuffix(name, ".jar"):
+ return name
+ default:
+ return filepath.Join(buildDir, ".intermediates", defaultJavaDir, name, "android_common", "turbine-combined", name+".jar")
+ }
}
func TestJavaLinkType(t *testing.T) {