commit | 62374db3f6fcbacbe69754eab8232243fb38015b | [log] [tgz] |
---|---|---|
author | Simran Basi <sbasi@google.com> | Thu Jul 13 12:08:43 2017 -0700 |
committer | Keun Soo Yim <yim@google.com> | Thu Jul 13 20:56:34 2017 +0000 |
tree | 470a1b4998164ddfcdaac124066adf4178ac0bf2 | |
parent | bf3f330cae2f71eac945ab81c684cec1df69340f [diff] |
Fix CompatibilityBuildHelper to resupport partial paths. A recent CL updated the CompatibilityBuildHelper's getTestFile logic to search in more locations. This change fixes VTS as it specifies partial subpaths as the file to retrieve. Bug: 63625756 Test: run vts-codelab doesn't error out right away. Change-Id: I2188917fc700eb879d8c271a60858d24e2f8a989
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java index 750e79e..55b9604 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java
@@ -267,6 +267,12 @@ File testFile; for (String testDir: testDirs) { + testFile = new File(getTestsDir(), filename); + if (testFile.exists()) { + return testFile; + } + // The file may be in a subdirectory so do a more through search + // if it did not exist. testFile = FileUtil.findFile(new File(testDir), filename); if (testFile != null) { return testFile;