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
This commit is contained in:
Paul Duffin
2021-03-13 09:55:25 +00:00
parent e26e597fc8
commit 76101fa5ec
2 changed files with 47 additions and 52 deletions

View File

@@ -247,7 +247,14 @@ func moduleToPath(name string) string {
// 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) {