From 8fdafb81418033947ae11763e5e716bd7bdfe9ba Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Mon, 3 Aug 2015 18:59:40 -0500
Subject: [PATCH] Work around Nv not understanding the CL1.2 'custom' device
 type

---
 test/test_wrapper.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/test/test_wrapper.py b/test/test_wrapper.py
index 1f13b9cd..61c6d45a 100644
--- a/test/test_wrapper.py
+++ b/test/test_wrapper.py
@@ -668,7 +668,10 @@ def test_enqueue_task(ctx_factory):
     assert la.norm(a[::-1] - b) == 0
 
 
-def test_platform_get_devices(platform):
+def test_platform_get_devices(ctx_factory):
+    ctx = ctx_factory()
+    platform = ctx.devices[0].platform
+
     if platform.name == "Apple":
         pytest.xfail("Apple doesn't understand all the values we pass "
                 "for dev_type")
@@ -676,9 +679,12 @@ def test_platform_get_devices(platform):
     dev_types = [cl.device_type.ACCELERATOR, cl.device_type.ALL,
                  cl.device_type.CPU, cl.device_type.DEFAULT, cl.device_type.GPU]
     if (platform._get_cl_version() >= (1, 2) and
-            cl.get_cl_header_version() >= (1, 2)):
+            cl.get_cl_header_version() >= (1, 2)
+            and not platform.name.lower().startswith("nvidia")):
         dev_types.append(cl.device_type.CUSTOM)
+
     for dev_type in dev_types:
+        print(dev_type)
         devs = platform.get_devices(dev_type)
         if dev_type in (cl.device_type.DEFAULT,
                         cl.device_type.ALL,
-- 
GitLab