summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit01AWT.java13
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java13
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001RawInit00NEWT.java15
3 files changed, 26 insertions, 15 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit01AWT.java
index d47058857..24bd1b748 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit01AWT.java
@@ -185,24 +185,23 @@ public class TestPerf001GLJPanelInit01AWT extends UITestCase {
@Test
public void test01NopGLJPanel() throws InterruptedException, InvocationTargetException {
- final int width = 800, height = 600, rows = 5, cols = 5;
test(false /*useGears*/, width, height, rows, cols, true /* useGLJPanel */, false /*useAnim*/);
}
@Test
public void test02NopGLCanvas() throws InterruptedException, InvocationTargetException {
- final int width = 800, height = 600, rows = 5, cols = 5;
test(false /*useGears*/, width, height, rows, cols, false /* useGLJPanel */, false /*useAnim*/);
}
- static long duration = 2000; // ms
+ static long duration = 0; // ms
static boolean wait = false;
+ static int width = 800, height = 600, rows = 5, cols = 5;
volatile int initCount = 0;
public static void main(String[] args) {
- int width = 800, height = 600, rows = 5, cols = 5;
boolean useGLJPanel = true, useGears = false, manual=false;
+ boolean waitMain = false;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
@@ -223,10 +222,16 @@ public class TestPerf001GLJPanelInit01AWT extends UITestCase {
} else if(args[i].equals("-wait")) {
wait = true;
manual = true;
+ } else if(args[i].equals("-waitMain")) {
+ waitMain = true;
+ manual = true;
} else if(args[i].equals("-manual")) {
manual = true;
}
}
+ if( waitMain ) {
+ UITestCase.waitForKey("Main-Start");
+ }
if( manual ) {
GLProfile.initSingleton();
TestPerf001GLJPanelInit01AWT demo = new TestPerf001GLJPanelInit01AWT();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java
index 3988b8054..0ac66f907 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java
@@ -187,24 +187,23 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase {
@Test
public void test01NopGLJPanel() throws InterruptedException, InvocationTargetException {
- final int width = 800, height = 600, frameCount = 25;
test(false /*useGears*/, width, height, frameCount , true /* useGLJPanel */, false /*useAnim*/);
}
@Test
public void test02NopGLCanvas() throws InterruptedException, InvocationTargetException {
- final int width = 800, height = 600, frameCount = 25;
test(false /*useGears*/, width, height, frameCount , false /* useGLJPanel */, false /*useAnim*/);
}
- static long duration = 2000; // ms
+ static long duration = 0; // ms
static boolean wait = false;
+ static int width = 800, height = 600, frameCount = 25;
volatile int initCount = 0;
public static void main(String[] args) {
- int width = 800, height = 600, frameCount = 25;
boolean useGLJPanel = true, useGears = false, manual=false;
+ boolean waitMain = false;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
@@ -223,10 +222,16 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase {
} else if(args[i].equals("-wait")) {
wait = true;
manual = true;
+ } else if(args[i].equals("-waitMain")) {
+ waitMain = true;
+ manual = true;
} else if(args[i].equals("-manual")) {
manual = true;
}
}
+ if( waitMain ) {
+ UITestCase.waitForKey("Main-Start");
+ }
if( manual ) {
GLProfile.initSingleton();
TestPerf001GLJPanelInit02AWT demo = new TestPerf001GLJPanelInit02AWT();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001RawInit00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001RawInit00NEWT.java
index 772ab3107..6f7d9329b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001RawInit00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001RawInit00NEWT.java
@@ -70,7 +70,7 @@ public class TestPerf001RawInit00NEWT extends UITestCase {
final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(screen.getDisplay().getGraphicsDevice(), caps);
- if( wait && 1 == runNum ) {
+ if( wait && 0 == runNum ) {
UITestCase.waitForKey("Pre-Init");
}
System.err.println("INIT START #"+runNum);
@@ -103,7 +103,7 @@ public class TestPerf001RawInit00NEWT extends UITestCase {
final GLProfile glp = GLProfile.getGL2ES2();
final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
final GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
- if( wait && 1 == runNum ) {
+ if( wait && 0 == runNum ) {
UITestCase.waitForKey("Pre-Init");
}
System.err.println("INIT START #"+runNum);
@@ -181,7 +181,6 @@ public class TestPerf001RawInit00NEWT extends UITestCase {
if( 0 != manualTest && 1 != manualTest ) {
return;
}
- final int count = 50;
final Display display = NewtFactory.createDisplay(null, false);
final Screen screen = NewtFactory.createScreen(display, 0);
screen.addReference();
@@ -199,7 +198,6 @@ public class TestPerf001RawInit00NEWT extends UITestCase {
if( 0 != manualTest && 2 != manualTest ) {
return;
}
- final int width = 800, height = 600, count = 50;
testFull(0, width, height, count); // warm-up
testFull(1, width, height, count);
testFull(2, width, height, count);
@@ -207,9 +205,10 @@ public class TestPerf001RawInit00NEWT extends UITestCase {
static boolean wait = false;
static int manualTest = 0;
+ static int width = 800, height = 600, count = 50;
public static void main(String[] args) {
- int width = 800, height = 600, count = 50;
+ boolean waitMain = false;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-width")) {
@@ -220,12 +219,14 @@ public class TestPerf001RawInit00NEWT extends UITestCase {
count = MiscUtils.atoi(args[++i], count);
} else if(args[i].equals("-wait")) {
wait = true;
+ } else if(args[i].equals("-waitMain")) {
+ waitMain = true;
} else if(args[i].equals("-test")) {
manualTest = MiscUtils.atoi(args[++i], manualTest);
}
}
- if( wait ) {
- UITestCase.waitForKey("Main");
+ if( waitMain ) {
+ UITestCase.waitForKey("Main-Start");
}
org.junit.runner.JUnitCore.main(TestPerf001RawInit00NEWT.class.getName());
}