From 62204b16ee0d3d7f0876471668a68b9382d332bb Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 23 Dec 2008 18:48:14 +0000 Subject: [PATCH] fixed return value checking --- lib/as3/runtests.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/as3/runtests.py b/lib/as3/runtests.py index 3947f33..75975bb 100644 --- a/lib/as3/runtests.py +++ b/lib/as3/runtests.py @@ -44,7 +44,9 @@ def check(s): return 0 if not row: row = [0]*len - row[nr-1] = len + if row[nr-1]: + return 0 + row[nr-1] = 1 elif line == "ok": ok = 1 if ok: @@ -70,7 +72,6 @@ def runcmd(cmd,args,output,wait): fo.seek(0) output = fo.read() fo.close() - return ret,output class Test: @@ -86,10 +87,14 @@ class Test: self.run() def compile(self): + try: os.unlink("abc.swf"); + except: pass ret,output = runcmd("./parser",[self.file],"/tmp/abctest.txt",wait=60) self.compile_error = 0 self.compile_output = output - if ret&0xff00: + if ret: + self.compile_error = 1 + if not os.path.isfile("abc.swf"): self.compile_error = 1 def run(self): -- 1.7.10.4