tests: Exit on test failure

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Anna Schumaker 2014-01-22 19:30:13 -05:00 committed by Anna Schumaker
parent 22cb20d4ce
commit 36b76dcfc3
1 changed files with 5 additions and 1 deletions

View File

@ -15,15 +15,19 @@ def run_test(target, source, env):
if ret != 0:
print "Test returns: ", ret
if (len(source) == 2) and (ret == 0):
if (len(source) == 2):
good = str(source[1])
if (subprocess.call("diff -u %s %s" % (good, res), shell = True) != 0):
print
Exit(1)
else:
for line in open( str(target[0]) ):
print line.rstrip()
print
if ret != 0:
Exit(1)
def Test(group, src, gui = False):
name, extension = src.rsplit(".", 1)
mods = [ src ]