diff options
author | Wade Walker <[email protected]> | 2014-02-23 18:23:57 -0600 |
---|---|---|
committer | Wade Walker <[email protected]> | 2014-02-23 18:23:57 -0600 |
commit | 54ced2cf5d801470c106275291be17583e5e206d (patch) | |
tree | 3983673d769c898b515c46adf5f058af218b7710 /test/com/jogamp/opencl/HighLevelBindingTest.java | |
parent | 10f9ddfad21c8ab1d4287742d1b524ae11e916c8 (diff) |
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.
Diffstat (limited to 'test/com/jogamp/opencl/HighLevelBindingTest.java')
-rw-r--r-- | test/com/jogamp/opencl/HighLevelBindingTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index 6dd6a73f..6a003435 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -40,6 +40,7 @@ import com.jogamp.opencl.CLDevice.LocalMemType; import com.jogamp.opencl.CLDevice.Type; import com.jogamp.opencl.CLDevice.Capabilities; import com.jogamp.opencl.llb.CL; +import com.jogamp.opencl.test.util.MiscUtils; import com.jogamp.opencl.test.util.UITestCase; import java.io.IOException; @@ -137,6 +138,8 @@ public class HighLevelBindingTest extends UITestCase { public void contextlessTest() { out.println(" - - - highLevelTest; contextless - - - "); + if(MiscUtils.isOpenCLUnavailable()) + return; // platform/device info tests CLPlatform[] clPlatforms = CLPlatform.listCLPlatforms(); @@ -205,6 +208,9 @@ public class HighLevelBindingTest extends UITestCase { @Test public void platformTest() { + if(MiscUtils.isOpenCLUnavailable()) + return; + CLPlatform platformGPU = CLPlatform.getDefault(version(CL_1_0), type(GPU)); CLPlatform platformCPU = CLPlatform.getDefault(version(CL_1_0), type(CPU)); @@ -221,6 +227,8 @@ public class HighLevelBindingTest extends UITestCase { public void createContextTest() { out.println(" - - - highLevelTest; create context - - - "); + if(MiscUtils.isOpenCLUnavailable()) + return; CLPlatform platform = CLPlatform.getDefault(); CLDevice[] devices = platform.listCLDevices(); @@ -280,6 +288,8 @@ public class HighLevelBindingTest extends UITestCase { public void vectorAddGMTest() throws IOException { out.println(" - - - highLevelTest; global memory kernel - - - "); + if(MiscUtils.isOpenCLUnavailable()) + return; CLPlatform[] clPlatforms = CLPlatform.listCLPlatforms(); CLContext context = CLContext.create(clPlatforms[0]); |