File tree Expand file tree Collapse file tree 2 files changed +14
-16
lines changed
Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 11"""GLX (x-windows)-specific platform features"""
2+
23import ctypes , ctypes .util
34from OpenGL .platform import baseplatform , ctypesloader
45
@@ -11,22 +12,16 @@ class GLXPlatform(baseplatform.BasePlatform):
1112 # references to GL/GLU functions).
1213 @baseplatform .lazy_property
1314 def GL (self ):
14- try :
15- for name in ( 'OpenGL' , 'GL' ) :
15+ for name in ( 'OpenGL' , 'GL' ) :
16+ try :
1617 lib = ctypesloader .loadLibrary (
1718 ctypes .cdll , name , mode = ctypes .RTLD_GLOBAL
1819 )
19- if lib :
20- return lib
21- raise ImportError ("Unable to find an OpenGL or GL library" )
22- except OSError as err :
23- try :
24- # libGL was the original name, older devices likely still need it...
25- return ctypesloader .loadLibrary (
26- ctypes .cdll , "GL" , mode = ctypes .RTLD_GLOBAL
27- )
2820 except OSError as err :
29- raise ImportError ("Unable to load OpenGL library" , * err .args )
21+ lib = None
22+ if lib :
23+ return lib
24+ raise ImportError ("Unable to load OpenGL or GL library" )
3025
3126 @baseplatform .lazy_property
3227 def GLU (self ):
Original file line number Diff line number Diff line change @@ -74,17 +74,20 @@ def test_x():
7474 "Test did not produce output: %s" ,
7575 stderr .decode ('utf-8' , errors = 'ignore' ),
7676 )
77- raise RuntimeError ('Test script failure' )
77+ raise RuntimeError ('Test script failure on %s' % ( func . __name__ ) )
7878 if 'SKIP' in lines :
79- raise pytest .skip ("Skipped by executable" )
79+ raise pytest .skip ("Skipped by executable on %s" % ( func . __name__ ) )
8080 elif 'OK' in lines :
8181 return
8282 else :
8383 log .error (
84- "Failing check script output : %s" ,
84+ "Failing check script stderr : %s" ,
8585 stderr .decode ('utf-8' , errors = 'ignore' ),
8686 )
87- print (output )
87+ log .error (
88+ "Failing check script stdout: %s" ,
89+ output ,
90+ )
8891 raise RuntimeError ("Test Failed" )
8992
9093 return test_x
You can’t perform that action at this time.
0 commit comments