Run latestRun = Run.getLatest(config);
Run newRun = Run.create(config);
List<String> workingList = new ArrayList<String>();
List<String> crashingList = new ArrayList<String>();
RunResult runResult;
if (latestRun == null) {
LOGGER.info("running list of all tests");
runResult = runTests(null, true, workingList, crashingList, newRun.getTimestampString());
runResult.setSystemProperty("jtestserver.process", vmType);
} else {
LOGGER.info("running list of working tests");
File workingTests = latestRun.getWorkingTests();
runResult = runTests(workingTests, true, workingList, crashingList, newRun.getTimestampString());
runResult.setSystemProperty("jtestserver.process", vmType);
LOGGER.info("running list of crashing tests");
File crashingTests = latestRun.getCrashingTests();
RunResult rr = runTests(crashingTests, false, workingList, crashingList,
newRun.getTimestampString());
mergeResults(runResult, rr);
}
LOGGER.info("writing crashing & working tests lists");