diff options
author | Sven Gothel <[email protected]> | 2012-10-09 05:56:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-09 05:56:45 +0200 |
commit | 7587cce91c3fda7dcff4e36e1aa0edf53bf34e00 (patch) | |
tree | 10699c4ccb5675c7b72ae43f4d1a613ce114a6b7 | |
parent | 14fcd3fced135a2a419e61fd260fa3b7e16816b9 (diff) |
TestInitConcurrent0[12]NEWT: Reduce test w/ 16 threads to 6 for ARM || WINDOWS if not started from console
Sadly it appears that w/ the ATI Catalyst driver,
the TestInitConcurrent02NEWT w/ 16 concurrent threads brings down the JVM sometimes.
This results in a locked singleton thread and distrubs the whole unit tests session.
We are aware of the ATI Catalyst threading bug on Windows and Linux.
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java | 12 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java index e5ed8a79f..719d1fc9d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java @@ -42,6 +42,7 @@ import com.jogamp.common.os.Platform; * </p> */ public class TestInitConcurrent01NEWT extends InitConcurrentBaseNEWT { + static boolean mainRun = false; @Test public void test02TwoThreads() throws InterruptedException { @@ -55,16 +56,21 @@ public class TestInitConcurrent01NEWT extends InitConcurrentBaseNEWT { @Test public void test16SixteenThreads() throws InterruptedException { - if( Platform.getCPUFamily() != Platform.CPUFamily.ARM ) { + if( !mainRun && + Platform.getCPUFamily() != Platform.CPUFamily.ARM && + Platform.getOSType() != Platform.OSType.WINDOWS ) { runJOGLTasks(16, true); } else { - runJOGLTasks( 8, true); + runJOGLTasks( 6, true); } } public static void main(String args[]) throws IOException { + mainRun = true; for(int i=0; i<args.length; i++) { - if(args[i].equals("-time")) { + if(args[i].equals("-normalRun")) { + mainRun = false; + } else if(args[i].equals("-time")) { i++; try { duration = Integer.parseInt(args[i]); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java index 51e9af00e..fab427a45 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java @@ -42,6 +42,7 @@ import com.jogamp.common.os.Platform; * </p> */ public class TestInitConcurrent02NEWT extends InitConcurrentBaseNEWT { + static boolean mainRun = false; @Test public void test02TwoThreads() throws InterruptedException { @@ -55,16 +56,21 @@ public class TestInitConcurrent02NEWT extends InitConcurrentBaseNEWT { @Test public void test16SixteenThreads() throws InterruptedException { - if( Platform.getCPUFamily() != Platform.CPUFamily.ARM ) { + if( !mainRun && + Platform.getCPUFamily() != Platform.CPUFamily.ARM && + Platform.getOSType() != Platform.OSType.WINDOWS ) { runJOGLTasks(16, false); } else { - runJOGLTasks( 8, false); + runJOGLTasks( 6, false); } } public static void main(String args[]) throws IOException { + mainRun = true; for(int i=0; i<args.length; i++) { - if(args[i].equals("-time")) { + if(args[i].equals("-normalRun")) { + mainRun = false; + } else if(args[i].equals("-time")) { i++; try { duration = Integer.parseInt(args[i]); |