summaryrefslogtreecommitdiffstats
path: root/test/com/jogamp/opencl/CLCommandQueueTest.java
diff options
context:
space:
mode:
authorWade Walker <[email protected]>2014-02-23 18:23:57 -0600
committerWade Walker <[email protected]>2014-02-23 18:23:57 -0600
commit54ced2cf5d801470c106275291be17583e5e206d (patch)
tree3983673d769c898b515c46adf5f058af218b7710 /test/com/jogamp/opencl/CLCommandQueueTest.java
parent10f9ddfad21c8ab1d4287742d1b524ae11e916c8 (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/CLCommandQueueTest.java')
-rw-r--r--test/com/jogamp/opencl/CLCommandQueueTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java
index c9b1b567..76260289 100644
--- a/test/com/jogamp/opencl/CLCommandQueueTest.java
+++ b/test/com/jogamp/opencl/CLCommandQueueTest.java
@@ -35,6 +35,7 @@ import org.junit.runners.MethodSorters;
import java.util.concurrent.CountDownLatch;
+import com.jogamp.opencl.test.util.MiscUtils;
import com.jogamp.opencl.test.util.UITestCase;
import com.jogamp.opencl.util.MultiQueueBarrier;
import com.jogamp.opencl.CLCommandQueue.Mode;
@@ -101,6 +102,8 @@ public class CLCommandQueueTest extends UITestCase {
public void eventsTest() throws IOException {
out.println(" - - - event synchronization test - - - ");
+ if(MiscUtils.isOpenCLUnavailable())
+ return;
CLContext context = CLContext.create();
@@ -171,6 +174,8 @@ public class CLCommandQueueTest extends UITestCase {
public void eventConditionsTest() throws IOException {
out.println(" - - - event conditions test - - - ");
+ if(MiscUtils.isOpenCLUnavailable())
+ return;
CLPlatform platform = CLPlatform.getDefault(CLPlatformFilters.queueMode(OUT_OF_ORDER_MODE));
@@ -231,6 +236,8 @@ public class CLCommandQueueTest extends UITestCase {
public void profilingEventsTest() throws IOException {
out.println(" - - - event synchronization test - - - ");
+ if(MiscUtils.isOpenCLUnavailable())
+ return;
CLContext context = CLContext.create();
@@ -286,6 +293,8 @@ public class CLCommandQueueTest extends UITestCase {
@Test
public void customEventsTest() throws IOException, InterruptedException {
out.println(" - - - user events test - - - ");
+ if(MiscUtils.isOpenCLUnavailable())
+ return;
CLPlatform[] platforms = CLPlatform.listCLPlatforms();
CLPlatform theChosenOne = platforms[0];
@@ -362,6 +371,8 @@ public class CLCommandQueueTest extends UITestCase {
public void eventCallbackTest() throws InterruptedException {
out.println(" - - - event callback test - - - ");
+ if(MiscUtils.isOpenCLUnavailable())
+ return;
CLPlatform platform = CLPlatform.getDefault();
@@ -402,6 +413,8 @@ public class CLCommandQueueTest extends UITestCase {
public void concurrencyTest() throws IOException, InterruptedException {
out.println(" - - - QueueBarrier test - - - ");
+ if(MiscUtils.isOpenCLUnavailable())
+ return;
final int elements = ONE_MB / SIZEOF_INT * 10; // 20MB per buffer