Issue #1990 allow work assignments to work with TestPathManager, if they set the baseline_repo variable to point to the location of the git repo for AWIPS2_baseline

Change-Id: Iad2e6bc92e20d4135837fa1dd3a7521fa1dbb751

Former-commit-id: 3aa8e33e77 [formerly a9801dd87f] [formerly 5a4bd2894e] [formerly 3aa8e33e77 [formerly a9801dd87f] [formerly 5a4bd2894e] [formerly 6ae260f4e7 [formerly 5a4bd2894e [formerly 2d26f8f1eac681586684680a84c41d06437dead5]]]]
Former-commit-id: 6ae260f4e7
Former-commit-id: 91ae94f0c3 [formerly 34be2d04c9] [formerly 13718a3671328ceb77dc06ba716871cb6e8d7f6e [formerly bdbc49fe34]]
Former-commit-id: af533a7e2aa842db3199db9b0ffdcd4563b2017f [formerly 870ac9d14d]
Former-commit-id: ad5d586e5e
This commit is contained in:
Matt Nash 2013-05-09 11:48:23 -05:00
parent 2c625de614
commit e008f1d684

View file

@ -156,7 +156,8 @@ public class TestPathManager extends PathManager {
* @return
*/
private File createTestIsolatedVersionOfLocalizationFile(
LocalizationContext context, String fileName, File baselinedVersion) {
LocalizationContext context, String fileName,
File baselinedVersion) {
File savedFileBaseDir = new File(savedLocalizationFileDir,
context.toPath());
File savedFile = new File(savedFileBaseDir, fileName);
@ -205,8 +206,19 @@ public class TestPathManager extends PathManager {
}
if (buildEdexDir == null) {
throw new RuntimeException(
"Unable to find the build.edex directory!");
// work assignment workaround to for tests since we don't
// know where the baseline repo is and we can't necessarily
// find files if we don't know the baseline repo's location
// THIS MEANS THAT FOR WORK ASSIGNMENTS WE MUST HAVE
// BASELINE_DIR SET
buildEdexDir = new File(System.getenv("baseline_dir")
.replace("\n", ""), "edexOsgi" + File.separator
+ "build.edex");
if (buildEdexDir.exists() == false
|| buildEdexDir.isDirectory() == false) {
throw new RuntimeException(
"Unable to find the build.edex directory!");
}
}
utilityDirs.add(new File(buildEdexDir, "esb/data/utility"));