Skip to content

Commit ce76e24

Browse files
committed
Tests: handle case when no OpenCL device is available
1 parent a7395fd commit ce76e24

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

python/pyluxcoretest/pyluxcoretest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ def PropertiesTests():
161161

162162
def LuxRaysDeviceTests():
163163
print("LuxRays device information example......", flush=True)
164-
deviceList = pyluxcore.GetOpenCLDeviceList()
164+
try:
165+
deviceList = pyluxcore.GetOpenCLDeviceList()
166+
except RuntimeError as err:
167+
print(str(err))
165168
print("OpenCL device list: %s\n" % str(deviceList), flush=True)
166169

167170

0 commit comments

Comments
 (0)