tests: Exit on test failure
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
parent
22cb20d4ce
commit
36b76dcfc3
|
@ -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 ]
|
||||
|
|
Loading…
Reference in New Issue