summaryrefslogtreecommitdiffstats
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
parent9a2034b4f493465f93386c6462cbd0e2b68db19d (diff)
Add main() to TestFocus01SwingAWT
-rwxr-xr-xmake/scripts/tests.sh4
-rw-r--r--src/junit/com/jogamp/test/junit/newt/TestFocus01SwingAWT.java31
2 files changed, 34 insertions, 1 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index cf063b767..f935a13cb 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -19,7 +19,7 @@ spath=`dirname $0`
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01NEWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting02NEWT $*
-$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01aAWT $*
+# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01aAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01bAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cSwingAWT $*
@@ -27,4 +27,6 @@ $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.Test
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.awt.TestSwingAWTUsageBeforeJOGLInitBug411 $*
+$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus01SwingAWT $*
+
$spath/count-edt-start.sh java-run.log
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" } );
+ }
+
+
}