Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Guss2018-08-15 19:50:03 -0400
committerDominic Guss2018-08-20 18:00:50 -0400
commit91954c396283268b14dd85117835bea9a1527143 (patch)
tree225f7e9cf50d50ef1a900b809e86fd6969552360
parentd7f46ff16e87f9aeaf3e23b57cb5a4ad77d6c20e (diff)
downloadorg.eclipse.osee-91954c396283268b14dd85117835bea9a1527143.tar.gz
org.eclipse.osee-91954c396283268b14dd85117835bea9a1527143.tar.xz
org.eclipse.osee-91954c396283268b14dd85117835bea9a1527143.zip
bug[ats_TW10426]: Coverage tool not accounting for newly added IMPORTED_RESULTS directory
Change-Id: I840456f8949f29d7c74ed64f9347bded8fc72f5a Signed-off-by: Dominic Guss <Dominic.Guss@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java29
1 files changed, 17 insertions, 12 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
index 4c99243bb3c..4e40bad336b 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
@@ -62,6 +62,7 @@ import org.eclipse.osee.vcast.model.VCastStatementCoverage;
*/
public class LisFileParser implements DispoImporterApi {
private static final String RESULTS = "results";
+ private static final String IMPORTED_RESULTS = "IMPORTED_RESULTS";
private static final String LOG = "\\s*(log).*";
private static final String EXIT_WHEN = "\\s*\\( \\)\\s*\\( \\)\\s*(EXIT WHEN).*";
private static final String WHEN_FOR = "\\s*\\( \\)\\s*(WHEN|FOR).*";
@@ -387,19 +388,23 @@ public class LisFileParser implements DispoImporterApi {
boolean exists = false;
File resultsFile = new File(resultPathAbs);
if (!resultsFile.exists()) {
- File resultsDir = new File(vCastDir + File.separator + RESULTS);
- File[] files = resultsDir.listFiles();
- for (File file : files) {
- String inputF = file.toString();
- String outputF = inputF.replaceAll(config.getResultsFileExtRegex(), "");
- if (outputF.toString().equalsIgnoreCase(resultsFile.toString())) {
- process(report, resultPath, file);
- exists = true;
- break;
+ List<File> resultsDirs = new ArrayList<File>();
+ resultsDirs.add(new File(vCastDir + File.separator + RESULTS));
+ resultsDirs.add(new File(vCastDir + File.separator + RESULTS + File.separator + IMPORTED_RESULTS));
+ for (File resultsDir : resultsDirs) {
+ File[] files = resultsDir.listFiles();
+ for (File file : files) {
+ String inputF = file.toString();
+ String outputF = inputF.replaceAll(config.getResultsFileExtRegex(), "");
+ if (outputF.toString().equalsIgnoreCase(resultsFile.toString())) {
+ process(report, resultPath, file);
+ exists = true;
+ break;
+ }
+ }
+ if (!exists) {
+ report.addEntry("SQL", String.format("Could not find DAT file [%s]", resultPathAbs), WARNING);
}
- }
- if (!exists) {
- report.addEntry("SQL", String.format("Could not find DAT file [%s]", resultPathAbs), WARNING);
}
} else {
process(report, resultPath, resultsFile);

Back to the top