summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-09-26 03:13:21 +0200
committerSven Gothel <[email protected]>2010-09-26 03:13:21 +0200
commit0d073c5ea4426b0139409b20a3879b6003f795b0 (patch)
treeaa7dc8f69f4513eb0d754c60877951cbc8b63f9c /src
parent9a2034b4f493465f93386c6462cbd0e2b68db19d (diff)
Add main() to TestFocus01SwingAWT
Diffstat (limited to 'src')
-rw-r--r--src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java b/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java
index a0039106e..42a58e2b1 100644
--- a/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java
@@ -9,6 +9,7 @@ import java.awt.Robot;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.lang.reflect.InvocationTargetException;
+import java.io.IOException;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
@@ -187,4 +188,34 @@ public class TestFocus01SwingAWT {
}
}
+ static int atoi(String a) {
+ int i=0;
+ try {
+ i = Integer.parseInt(a);
+ } catch (Exception ex) { ex.printStackTrace(); }
+ return i;
+ }
+
+ public static void main(String args[]) throws IOException {
+ for(int i=0; i<args.length; i++) {
+ if(args[i].equals("-time")) {
+ durationPerTest = atoi(args[++i]);
+ }
+ }
+ System.out.println("durationPerTest: "+durationPerTest);
+ String tstname = TestFocus01SwingAWT.class.getName();
+ org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
+ tstname,
+ "filtertrace=true",
+ "haltOnError=false",
+ "haltOnFailure=false",
+ "showoutput=true",
+ "outputtoformatters=true",
+ "logfailedtests=true",
+ "logtestlistenerevents=true",
+ "formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
+ "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } );
+ }
+
+
}