aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-03 03:16:10 +0200
committerSven Gothel <[email protected]>2014-09-03 03:16:10 +0200
commitc720767642618cfb4f3739dc6962cde0465e25c5 (patch)
treebb19fc9907a81b01432166f6621e94693a6ba3e3 /test
parent87eb9b93c250a0a8746176cbac9448ea62f26afa (diff)
Bug 978: Promote CLAbstractImpl.isAvailable() to CLPlatform, public API. isAvailable() simply shall return true if JOCL/OpenCL libs could be loaded.
- Promote CLAbstractImpl.isAvailable() to CLPlatform, public API. - CLAbstractImpl.isAvailable() simply shall return true if JOCL/OpenCL libs could be loaded.
Diffstat (limited to 'test')
-rw-r--r--test/com/jogamp/opencl/gl/CLGLTest.java3
-rw-r--r--test/com/jogamp/opencl/test/util/MiscUtils.java8
-rw-r--r--test/com/jogamp/opencl/test/util/UITestCase.java3
3 files changed, 8 insertions, 6 deletions
diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java
index 62e2b2b..c790535 100644
--- a/test/com/jogamp/opencl/gl/CLGLTest.java
+++ b/test/com/jogamp/opencl/gl/CLGLTest.java
@@ -234,10 +234,7 @@ public class CLGLTest extends UITestCase {
@Test(timeout=15000)
public void textureSharing() {
-
out.println(" - - - glcl; textureSharing - - - ");
- if(MiscUtils.isOpenCLUnavailable())
- return;
initGL();
makeGLCurrent();
diff --git a/test/com/jogamp/opencl/test/util/MiscUtils.java b/test/com/jogamp/opencl/test/util/MiscUtils.java
index 85798a0..9cd625b 100644
--- a/test/com/jogamp/opencl/test/util/MiscUtils.java
+++ b/test/com/jogamp/opencl/test/util/MiscUtils.java
@@ -93,8 +93,12 @@ public class MiscUtils {
* @return true if OpenCL is not available for this operating system, CPU architecture, et cetera.
* This is meant to be a check that there can't possibly be a driver installed because
* nobody makes one, not just a check that we didn't see one.
+ * <p>
+ * To check whether an OpenCL implementation/library has actually been loaded,
+ * use {@link CLAbstractImpl#isAvailable()}.
+ * </p>
*/
- public static final boolean isOpenCLUnavailable() {
- return !CLAbstractImpl.isAvailable() && knownOSWithoutCLImpl.contains(Platform.getOSType());
+ public static final boolean isKnownOSWithoutCLImpl() {
+ return knownOSWithoutCLImpl.contains(Platform.getOSType());
}
}
diff --git a/test/com/jogamp/opencl/test/util/UITestCase.java b/test/com/jogamp/opencl/test/util/UITestCase.java
index b27f206..c3c59f3 100644
--- a/test/com/jogamp/opencl/test/util/UITestCase.java
+++ b/test/com/jogamp/opencl/test/util/UITestCase.java
@@ -36,6 +36,7 @@ import java.util.List;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.locks.SingletonInstance;
+import com.jogamp.opencl.CLPlatform;
import org.junit.Assume;
import org.junit.Before;
@@ -126,7 +127,7 @@ public abstract class UITestCase {
@Before
public void setUp() {
System.err.print("++++ UITestCase.setUp: "+getFullTestName(" - "));
- final boolean isOpenCLUnavailable = MiscUtils.isOpenCLUnavailable();
+ final boolean isOpenCLUnavailable = !CLPlatform.isAvailable();
final boolean abortTest = isOpenCLUnavailable || !testSupported;
if( abortTest ) {
if( isOpenCLUnavailable ) {