try {
if (args.length != 1) {
usage();
System.exit(0);
}
Properties props = new Properties();
props.load(new FileInputStream(args[0]));
Iterator it = props.keySet().iterator();
while (it.hasNext()) {
String key = (String) it.next();
URL value = new URL((String) props.get(key));
try {
Class test = ClassUtils.forName(key);
Field urlField = test.getField("url");
urlField.set(null, value);
TestRunner.run(new TestSuite(test));
}
catch (Throwable t) {
System.err.println("Failure running " + key);
t.printStackTrace();
}
}
}
catch (Throwable t) {
}