aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-18 04:47:34 +0100
committerSven Gothel <[email protected]>2023-01-18 04:47:34 +0100
commit9e5599b0687a27ffd1251f7c058a70b1f94324aa (patch)
treedcbd076be41c364819b116955fadb57c372ead2b /src/test
parent1562a6d4c71b27378612306f825c2530c938f859 (diff)
Test: MacOS: Disable automatic tests (TBD, WIP)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java14
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java17
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGJoglAWTCompareNewtAWT.java16
3 files changed, 47 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java
index c19183225..55a75d71e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java
@@ -44,6 +44,8 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
import java.io.IOException;
+import com.jogamp.common.os.Platform;
+import com.jogamp.junit.util.JunitTracer;
import com.jogamp.nativewindow.NativeSurface;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES2;
@@ -55,6 +57,7 @@ import com.jogamp.opengl.GLUniformData;
import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
import org.junit.Assert;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@@ -266,7 +269,18 @@ public class TestFBOMRTNEWT01 extends UITestCase {
NEWTGLContext.destroyWindow(winctx);
}
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ if( !manual_test ) {
+ if( Platform.OSType.MACOS == Platform.getOSType() ) {
+ JunitTracer.setTestSupported(false);
+ }
+ }
+ }
+ static boolean manual_test = false;
+
public static void main(final String args[]) throws IOException {
+ manual_test = true;
System.err.println("main - start");
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
index af329dfa7..80a01e8e0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
@@ -31,7 +31,9 @@ package com.jogamp.opengl.test.junit.jogl.acore;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
+import com.jogamp.common.os.Platform;
import com.jogamp.common.util.InterruptSource;
+import com.jogamp.junit.util.JunitTracer;
import com.jogamp.nativewindow.NativeSurface;
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.GLCapabilities;
@@ -39,6 +41,7 @@ import com.jogamp.opengl.GLEventListener;
import com.jogamp.opengl.GLProfile;
import org.junit.Test;
+import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@@ -73,6 +76,7 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
this.frameCount = frameCount;
}
+ @Override
public void run() {
System.err.println("Animatr "+id+", count "+frameCount+": PRE: "+Thread.currentThread().getName());
@@ -105,6 +109,7 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
this.actionCount = actionCount;
}
+ @Override
public void run() {
System.err.println("Resizer "+id+", count "+actionCount+": PRE: "+Thread.currentThread().getName());
@@ -112,6 +117,7 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
final int _c = c;
win.runOnEDTIfAvail(true, new Runnable() {
int i = _c;
+ @Override
public void run() {
System.err.println("Resizer "+id+": Action "+i+" / "+actionCount+": "+Thread.currentThread().getName());
// Normal resize, may trigger immediate display within lock
@@ -259,7 +265,18 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
runJOGLTasks(3, 100, 3, 50);
}
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ if( !manual_test ) {
+ if( Platform.OSType.MACOS == Platform.getOSType() ) {
+ JunitTracer.setTestSupported(false);
+ }
+ }
+ }
+ static boolean manual_test = false;
+
public static void main(final String args[]) throws IOException {
+ manual_test = true;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
i++;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGJoglAWTCompareNewtAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGJoglAWTCompareNewtAWT.java
index b48000046..bdc50353a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGJoglAWTCompareNewtAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestJPEGJoglAWTCompareNewtAWT.java
@@ -29,7 +29,9 @@
package com.jogamp.opengl.test.junit.jogl.util.texture;
+import com.jogamp.common.os.Platform;
import com.jogamp.common.util.IOUtil;
+import com.jogamp.junit.util.JunitTracer;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.test.junit.jogl.demos.TextureDraw01Accessor;
import com.jogamp.opengl.test.junit.jogl.demos.es2.TextureDraw01ES2Listener;
@@ -58,6 +60,7 @@ import java.io.InputStream;
import java.net.URLConnection;
import org.junit.Assert;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@@ -144,6 +147,7 @@ public class TestJPEGJoglAWTCompareNewtAWT extends UITestCase {
@Override public void init(final GLAutoDrawable drawable) {}
+ @Override
public void display(final GLAutoDrawable drawable) {
// 1 snapshot
if(null!=((TextureDraw01Accessor)gle).getTexture() && !shot) {
@@ -203,6 +207,7 @@ public class TestJPEGJoglAWTCompareNewtAWT extends UITestCase {
@Override public void init(final GLAutoDrawable drawable) {}
+ @Override
public void display(final GLAutoDrawable drawable) {
// 1 snapshot
if( null!=gle && null!=((TextureDraw01Accessor)gle).getTexture() && !shot) {
@@ -258,7 +263,18 @@ public class TestJPEGJoglAWTCompareNewtAWT extends UITestCase {
testImpl(files[8]);
}
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ if( !manual_test ) {
+ if( Platform.OSType.MACOS == Platform.getOSType() ) {
+ JunitTracer.setTestSupported(false);
+ }
+ }
+ }
+ static boolean manual_test = false;
+
public static void main(final String args[]) throws IOException {
+ manual_test = true;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
i++;