From 7573b967c07b103d74afdda2aafe4444006a8533 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Nov 2011 06:20:16 +0100 Subject: TestsGLSLShaderState*: Reduce loops / Extend timeout - Slow devices may hit TO otherwise. --- .../jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java | 4 ++-- .../test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java | 14 ++++++++------ .../test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java index ae08b640c..297cbbb90 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java @@ -37,8 +37,8 @@ import javax.media.opengl.GLDrawable; import org.junit.Assert; public class GLSLMiscHelper { - public static final int frames_perftest = 10000; // frames - public static final int frames_warmup = 500; // frames + public static final int frames_perftest = 600; // frames + public static final int frames_warmup = 100; // frames public static void validateGLArrayDataServerState(GL2ES2 gl, GLArrayDataServer data) { final ShaderState st = ShaderState.getShaderState(gl); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java index 672938310..c84b56d85 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java @@ -54,13 +54,14 @@ import org.junit.BeforeClass; */ public class TestGLSLShaderState01NEWT extends UITestCase { static long durationPerTest = 10; // ms + static boolean firstUIActionOnProcess = false; static final int vertices0_loc = 0; // FIXME: AMD needs this to be location 0 ? hu ? static final int colors0_loc = 1; @BeforeClass public static void initClass() { - GLProfile.initSingleton(true); + GLProfile.initSingleton(firstUIActionOnProcess); } @Test @@ -181,11 +182,11 @@ public class TestGLSLShaderState01NEWT extends UITestCase { NEWTGLContext.destroyWindow(winctx); } - @Test(timeout=120000) + @Test(timeout=240000) public void testShaderState00PerformanceSingleKeepEnabled() throws InterruptedException { testShaderState00PerformanceSingle(false); } - @Test(timeout=120000) + @Test(timeout=240000) public void testShaderState00PerformanceSingleToggleEnable() throws InterruptedException { testShaderState00PerformanceSingle(true); } @@ -278,7 +279,7 @@ public class TestGLSLShaderState01NEWT extends UITestCase { NEWTGLContext.destroyWindow(winctx); } - @Test(timeout=120000) + @Test(timeout=240000) public void testShaderState01PerformanceDouble() throws InterruptedException { // preset .. final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 480, 480, false); @@ -386,9 +387,10 @@ public class TestGLSLShaderState01NEWT extends UITestCase { for(int i=0; i