summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-03-19 11:08:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-03-19 11:08:17 +0000
commit903a8a08aba5be71b8bea9eff18ff8acd18031a1 (patch)
treec31f2f6947aec7021f30c35a6f9b9dacdf2d4a3e /java/java_test.go
parentb1672af5d29ef9ad060453df99621edc3b617506 (diff)
parent76101fa5ece8e74a3b5a409185af00c9fa25c4d6 (diff)
Merge "Convert TestClasspath to test fixtures"
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go
index b68945fd1..5057ba281 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -245,7 +245,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) {