public static void runTests(String[] args, Class testClass) { args = Log.init(args); args = parseArgs(args); args = TestHelper.parseArgs(args); try { System.err.printf("\nRunning %s, %d times\n", testClass.getName(), repeatCount); Test test = collectTests(args, testClass); if (repeatCount > 1) test = new RepeatedTest(test, repeatCount); runTest(test); } catch(Exception e) { System.err.println(e.getMessage()); System.exit(-2); } } }