Skip to content

Commit 3632b85

Browse files
DeviceInfracopybara-github
DeviceInfra
authored andcommitted
Internal change
PiperOrigin-RevId: 737849113
1 parent a41035a commit 3632b85

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: src/java/com/google/devtools/mobileharness/platform/android/xts/suite/TestSuiteInfo.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,15 @@ public static TestSuiteInfo getInstance(String xtsRootDir, String xtsType) {
111111
}
112112
}
113113
}
114-
return instance;
114+
// To adapt to ATS UI usage where xtsRootDir can change in lifetime of the program.
115+
if (xtsRootDir.equals(instance.xtsRootDir) && xtsType.equals(instance.xtsTypeStr)) {
116+
return instance;
117+
} else {
118+
logger.atInfo().log(
119+
"Creating %s instance with params [xts root dir: %s, xts type: %s]",
120+
TestSuiteInfo.class.getSimpleName(), xtsRootDir, xtsType);
121+
return new TestSuiteInfo(xtsRootDir, xtsType, new JarFileUtil());
122+
}
115123
}
116124

117125
/** Gets the build number of the test suite. */

0 commit comments

Comments
 (0)