Fix test runner script to not crash if one of the tests_errors didn't return the expected result.
This commit is contained in:
@@ -108,7 +108,10 @@ def run_test(filename):
|
|||||||
sp = subprocess.Popen(shlex.split(ispc_cmd), stdin=None,
|
sp = subprocess.Popen(shlex.split(ispc_cmd), stdin=None,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
output = sp.communicate()[1]
|
out = sp.communicate()
|
||||||
|
output = ""
|
||||||
|
output += out[0]
|
||||||
|
output += out[1]
|
||||||
got_error = (sp.returncode != 0)
|
got_error = (sp.returncode != 0)
|
||||||
|
|
||||||
# figure out the error message we're expecting
|
# figure out the error message we're expecting
|
||||||
@@ -120,8 +123,8 @@ def run_test(filename):
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
if (output.find(firstline) == -1):
|
if (output.find(firstline) == -1):
|
||||||
print "Didn't see expected error message \"%s\" from " + \
|
print "OUT %s" % filename
|
||||||
"test %s.\nActual outout: %s" % \
|
print "Didnt see expected error message %s from test %s.\nActual output:\n%s" % \
|
||||||
(firstline, filename, output)
|
(firstline, filename, output)
|
||||||
error_count += 1
|
error_count += 1
|
||||||
elif got_error == False:
|
elif got_error == False:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Can't assign to type "const uniform int32" on left-hand side
|
// Left hand side of assignment statement can't be assigned to
|
||||||
|
|
||||||
int bar(){
|
int bar(){
|
||||||
4 = 0;
|
4 = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user