Lines 553-558
Link Here
|
553 |
if ((reportFile != null) && isValidReportFile(reportFile)) { |
553 |
if ((reportFile != null) && isValidReportFile(reportFile)) { |
554 |
JUnitTestSuite reportSuite = parseReportFile(reportFile); |
554 |
JUnitTestSuite reportSuite = parseReportFile(reportFile); |
555 |
if ((reportSuite != null) && (reportSuite.getName().equals(currentSuite.getName()))) { |
555 |
if ((reportSuite != null) && (reportSuite.getName().equals(currentSuite.getName()))) { |
|
|
556 |
deleteReportFile(reportFile); // #171050 |
556 |
lastSuiteTime = reportSuite.getElapsedTime(); |
557 |
lastSuiteTime = reportSuite.getElapsedTime(); |
557 |
for(Testcase tc: currentSuite.getTestcases()){ |
558 |
for(Testcase tc: currentSuite.getTestcases()){ |
558 |
if (!tc.getOutput().isEmpty()){ |
559 |
if (!tc.getOutput().isEmpty()){ |
Lines 739-744
Link Here
|
739 |
return false; |
740 |
return false; |
740 |
} |
741 |
} |
741 |
} |
742 |
} |
|
|
743 |
|
744 |
private void deleteReportFile(File reportFile) { |
745 |
try { |
746 |
reportFile = FileUtil.normalizeFile(reportFile); |
747 |
String reportPath = reportFile.getAbsolutePath(); |
748 |
reportPath = reportPath.replace('\\', '/'); |
749 |
String projectPath = |
750 |
testSession.getProject().getProjectDirectory().getPath(); |
751 |
if (reportPath.startsWith(projectPath)) { |
752 |
// we won't delete not temporary report located in project |
753 |
return; |
754 |
} |
755 |
reportFile.delete(); |
756 |
} catch (Exception e) { |
757 |
// do nothing |
758 |
} |
759 |
} |
742 |
|
760 |
|
743 |
private File findReportFile() { |
761 |
private File findReportFile() { |
744 |
File file = new File(resultsDir, |
762 |
File file = new File(resultsDir, |