diff options
Diffstat (limited to 'src/test/com/jogamp/opengl')
10 files changed, 17 insertions, 1 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java index 7a15971d5..151cc0a56 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java @@ -73,6 +73,7 @@ public class TestScreenMode00aNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); GLProfile.initSingleton(); // hack to initialize GL for BCM_IV (Rasp.Pi) NativeWindowFactory.initSingleton(); width = 640; diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java index 8208ad6b7..d5323e1d2 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00bNEWT.java @@ -63,6 +63,7 @@ public class TestScreenMode00bNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); NativeWindowFactory.initSingleton(); width = 640; height = 480; diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java index dc3bf3c97..c2cb88b1c 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00cNEWT.java @@ -67,6 +67,7 @@ public class TestScreenMode00cNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); NativeWindowFactory.initSingleton(); if( NativeWindowFactory.TYPE_X11 != NativeWindowFactory.getNativeWindowType(true) ) { setTestSupported(false); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java index 41d110759..bff220648 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01aNEWT.java @@ -72,6 +72,7 @@ public class TestScreenMode01aNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); width = 100; height = 100; glp = GLProfile.getDefault(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java index 8ebcf320c..3c363b3f5 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01bNEWT.java @@ -67,6 +67,7 @@ public class TestScreenMode01bNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); width = 200; height = 200; glp = GLProfile.getDefault(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java index 07f9dc0ab..6a7a399ee 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01cNEWT.java @@ -67,6 +67,7 @@ public class TestScreenMode01cNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); width = 200; height = 200; glp = GLProfile.getDefault(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java index 14fe7b5d5..b4fd132a7 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode01dNEWT.java @@ -75,6 +75,7 @@ public class TestScreenMode01dNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); width = 640; height = 480; glp = GLProfile.getDefault(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java index 7ea879da2..25751662d 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02aNEWT.java @@ -69,6 +69,7 @@ public class TestScreenMode02aNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); width = 640; height = 480; glp = GLProfile.getDefault(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java index 547dc596e..aa1bbad3f 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode02bNEWT.java @@ -78,6 +78,7 @@ public class TestScreenMode02bNEWT extends UITestCase { @BeforeClass public static void initClass() { + setResetXRandRIfX11AfterClass(); glp = GLProfile.getDefault(); } diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java index 90452ebfb..d2ed7cd1e 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java +++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java @@ -69,6 +69,7 @@ public abstract class UITestCase { private static volatile SingletonInstance singletonInstance; private static volatile boolean testSupported = true; + private static volatile boolean resetXRandRIfX11AfterClass = false; private static volatile int maxMethodNameLen = 0; @@ -91,6 +92,10 @@ public abstract class UITestCase { testSupported = v; } + public static void setResetXRandRIfX11AfterClass() { + resetXRandRIfX11AfterClass = true; + } + public static void resetXRandRIfX11() { if( NativeWindowFactory.isInitialized() && NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(true) ) { try { @@ -144,7 +149,9 @@ public abstract class UITestCase { @AfterClass public static void oneTimeTearDown() { // one-time cleanup code - resetXRandRIfX11(); + if( resetXRandRIfX11AfterClass ) { + resetXRandRIfX11(); + } System.gc(); // force cleanup singletonInstance.unlock(); } |