summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/optimization_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/tests/optimization_test.py')
-rw-r--r--src/compiler/glsl/tests/optimization_test.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/compiler/glsl/tests/optimization_test.py b/src/compiler/glsl/tests/optimization_test.py
index a02dcd31a05..a413370a5e7 100644
--- a/src/compiler/glsl/tests/optimization_test.py
+++ b/src/compiler/glsl/tests/optimization_test.py
@@ -32,6 +32,13 @@ import sys
import sexps
import lower_jump_cases
+# The meson version handles windows paths better, but if it's not available
+# fall back to shlex
+try:
+ from meson.mesonlib import split_args
+except ImportError:
+ from shlex import split as split_args
+
def arg_parser():
parser = argparse.ArgumentParser()
@@ -58,10 +65,10 @@ def compare(actual, expected):
def get_test_runner(runner):
"""Wrap the test runner in the exe wrapper if necessary."""
- wrapper = os.environ.get('MESON_EXE_WRAPPER', None)
+ wrapper = os.environ.get('MESON_EXE_WRAPPER', None)
if wrapper is None:
return [runner]
- return [wrapper, runner]
+ return split_args(wrapper) + [runner]
def main():
@@ -109,7 +116,6 @@ if __name__ == '__main__':
main()
except OSError as e:
if e.errno == errno.ENOEXEC:
- print('Skipping due to lack of exe_wrapper.', file=sys.stderr)
+ print('Skipping due to inability to run host binaries', file=sys.stderr)
sys.exit(77)
- else:
- raise
+ raise