From 54ced2cf5d801470c106275291be17583e5e206d Mon Sep 17 00:00:00 2001 From: Wade Walker Date: Sun, 23 Feb 2014 18:23:57 -0600 Subject: Fix OpenCL test failures on Solaris. Since nobody currently makes an OpenCL driver for Solaris, all the tests used to fail, which told us nothing. This commit adds code to check whether OpenCL is unavailable and the OS is Solaris, in which case the test contents are skipped. If an OpenCL driver ever appears for Solaris, or if we start testing on another platform with no OpenCL driver, there's now one single place to add or remove checks that will allow for this. --- test/com/jogamp/opencl/gl/CLGLTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test/com/jogamp/opencl/gl') diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index 19bc1c99..52f0e574 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -45,6 +45,7 @@ import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLMemory.Mem; import com.jogamp.opencl.CLPlatform; +import com.jogamp.opencl.test.util.MiscUtils; import com.jogamp.opencl.test.util.UITestCase; import com.jogamp.opencl.util.CLDeviceFilters; import com.jogamp.opencl.util.CLPlatformFilters; @@ -106,9 +107,11 @@ public class CLGLTest extends UITestCase { @Test(timeout=15000) public void createContextTest() { - initGL(); - out.println(" - - - glcl; createContextTest - - - "); + if(MiscUtils.isOpenCLUnavailable()) + return; + + initGL(); CLPlatform platform = CLPlatform.getDefault(CLPlatformFilters.glSharing()); CLDevice device = platform.getMaxFlopsDevice(CLDeviceFilters.glSharing()); @@ -149,6 +152,8 @@ public class CLGLTest extends UITestCase { public void vboSharing() { out.println(" - - - glcl; vboSharing - - - "); + if(MiscUtils.isOpenCLUnavailable()) + return; initGL(); makeGLCurrent(); -- cgit v1.2.3