String testName = resolveTestName();
TestRunnable runnable = testRunnables.get(testName);
+ if (runnable == null) {
+ LOGGER.error("SCL Test Suite file (.sts) for test {} cannot be found from test repository.", testName);
+ return;
+ }
+ long start = System.nanoTime();
if (timeout > -1) {
+ LOGGER.info("Running test {} with a timeout of {} seconds", testName, timeout); //$NON-NLS-1$
Timer timer = new Timer();
timer.schedule(new TimerTask() {
}, timeout*1000);
try {
runnable.run();
+ long end = System.nanoTime();
+ LOGGER.info("Completed test {} execution in {} seconds", testName, String.format("%.3f", (end-start)*1e-9)); //$NON-NLS-1$
} catch (Exception e) {
LOGGER.error("Failed to run test {} runnable {}", testName, runnable, e);
} finally {
timer.cancel();
}
} else {
+ LOGGER.info("Running test {} without timeout", testName); //$NON-NLS-1$
try {
runnable.run();
+ long end = System.nanoTime();
+ LOGGER.info("Completed test {} execution in {} seconds", testName, String.format("%.3f", (end-start)*1e-9)); //$NON-NLS-1$
} catch (Exception e) {
LOGGER.error("Failed to run test {} runnable {}", testName, runnable, e);
}