summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2017-11-13 14:02:35 -0700
committerBrian Paul <brianp@vmware.com>2017-11-13 22:30:14 -0700
commit5cc8f49554c84bc45dc74ddd7176dc5676126873 (patch)
tree6200c48ebdd9b445c140baed54bbc7183ae6ca8d
parent168e9c41db98d6c53b57e43fe3e2606eb82d60b5 (diff)
all.py: fix version checks in is_feature_directory_supported()
The wflinfo versions should be floats already, so don't call float() again. If querying the ES api/version fails, we'll get None for the version number so check for that. Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r--tests/all.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/all.py b/tests/all.py
index c322232a0..70f8efd69 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -236,20 +236,20 @@ def is_feature_directory_supported(dir_name):
return gl_extension_supported(ext_name)
elif dir_name[:5] == "gles-":
# OpenGL ES test
- version = dir_name[5:]
- return float(version) <= float(wfl_info.gles_version)
+ version = float(dir_name[5:])
+ return wfl_info.gles_version != None and version <= wfl_info.gles_version
elif dir_name[:8] == "glsl-es-":
# OpenGL ES shader test
- version = dir_name[8:]
- return float(version) <= float(wfl_info.glsl_es_version)
+ version = float(dir_name[8:])
+ return wfl_info.glsl_es_version != None and version <= wfl_info.glsl_es_version
elif dir_name[:3] == "gl-":
# The directory is a GL version
- version = dir_name[3:]
- return float(version) <= float(wfl_info.gl_version)
+ version = float(dir_name[3:])
+ return version <= wfl_info.gl_version
elif dir_name[:5] == "glsl-":
# The directory is a GLSL version
- version = dir_name[5:]
- return float(version) <= float(wfl_info.glsl_version)
+ version = float(dir_name[5:])
+ return version <= wfl_info.glsl_version
else:
# The directory is something else. Don't skip it.
return True