git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed return value checking
[swftools.git]
/
lib
/
as3
/
runtests.py
diff --git
a/lib/as3/runtests.py
b/lib/as3/runtests.py
index
3947f33
..
75975bb
100644
(file)
--- 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
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:
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()
fo.seek(0)
output = fo.read()
fo.close()
-
return ret,output
class Test:
return ret,output
class Test:
@@
-86,10
+87,14
@@
class Test:
self.run()
def compile(self):
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
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):
self.compile_error = 1
def run(self):