From 76101fa5ece8e74a3b5a409185af00c9fa25c4d6 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Sat, 13 Mar 2021 09:55:25 +0000 Subject: 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 --- java/java_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 2eb724185..533055618 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -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) { -- cgit v1.2.3-59-g8ed1b