projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
driconf, glsl: Add a vs_position_always_invariant option
[mesa.git]
/
src
/
compiler
/
glsl
/
tests
/
warnings_test.py
diff --git
a/src/compiler/glsl/tests/warnings_test.py
b/src/compiler/glsl/tests/warnings_test.py
index 2c4fa5a0d5a1dc87b28325775d0fa5e313fcbee1..ed0774880d3ec251dcff16d1497bf47a3d5af7b0 100644
(file)
--- a/
src/compiler/glsl/tests/warnings_test.py
+++ b/
src/compiler/glsl/tests/warnings_test.py
@@
-21,8
+21,10
@@
from __future__ import print_function
import argparse
from __future__ import print_function
import argparse
+import errno
import os
import subprocess
import os
import subprocess
+import sys
def arg_parser():
def arg_parser():
@@
-38,6
+40,14
@@
def arg_parser():
return parser.parse_args()
return parser.parse_args()
+def get_test_runner(runner):
+ """Wrap the test runner in the exe wrapper if necessary."""
+ wrapper = os.environ.get('MESON_EXE_WRAPPER', None)
+ if wrapper is None:
+ return [runner]
+ return [wrapper, runner]
+
+
def main():
args = arg_parser()
files = [f for f in os.listdir(args.test_directory) if f.endswith('.vert')]
def main():
args = arg_parser()
files = [f for f in os.listdir(args.test_directory) if f.endswith('.vert')]
@@
-47,6
+57,8
@@
def main():
print('Could not find any tests')
exit(1)
print('Could not find any tests')
exit(1)
+ runner = get_test_runner(args.glsl_compiler)
+
print('====== Testing compilation output ======')
for file in files:
print('Testing {} ...'.format(file), end='')
print('====== Testing compilation output ======')
for file in files:
print('Testing {} ...'.format(file), end='')
@@
-56,7
+68,7
@@
def main():
expected = f.read().strip()
actual = subprocess.check_output(
expected = f.read().strip()
actual = subprocess.check_output(
-
[args.glsl_compiler,
'--just-log', '--version', '150', file]
+
runner + [
'--just-log', '--version', '150', file]
).strip()
if actual == expected:
).strip()
if actual == expected:
@@
-70,4
+82,11
@@
def main():
if __name__ == '__main__':
if __name__ == '__main__':
- main()
+ try:
+ main()
+ except OSError as e:
+ if e.errno == errno.ENOEXEC:
+ print('Skipping due to lack of exe_wrapper.', file=sys.stderr)
+ sys.exit(77)
+ else:
+ raise