Use last reported value as a result

extensions
Volodymyr Shymanskyy 5 years ago
parent b3c4053a10
commit 66ad448534

@ -204,17 +204,17 @@ def runInvoke(test):
actual = "<Crashed>" actual = "<Crashed>"
if not actual: if not actual:
result = re.findall(r'^Result: (.*?)$', "\n" + output + "\n", re.MULTILINE) result = re.findall(r'^Result: (.*?)$', "\n" + output + "\n", re.MULTILINE)
if len(result) == 1: if len(result) > 0:
actual = "result " + result[0] actual = "result " + result[-1]
actual_val = result[0] actual_val = result[0]
if not actual: if not actual:
result = re.findall(r'^Error: \[trap\] (.*?) \(', "\n" + output + "\n", re.MULTILINE) result = re.findall(r'^Error: \[trap\] (.*?) \(', "\n" + output + "\n", re.MULTILINE)
if len(result) == 1: if len(result) > 0:
actual = "trap " + result[0] actual = "trap " + result[-1]
if not actual: if not actual:
result = re.findall(r'^Error: (.*?)$', "\n" + output + "\n", re.MULTILINE) result = re.findall(r'^Error: (.*?)$', "\n" + output + "\n", re.MULTILINE)
if len(result) == 1: if len(result) > 0:
actual = "error " + result[0] actual = "error " + result[-1]
if not actual: if not actual:
actual = "<No Result>" actual = "<No Result>"
@ -314,13 +314,13 @@ else:
#"int_literals", -> stack underflow #"int_literals", -> stack underflow
#--- TODO --- #--- TODO ---
#"address", "align", "memory",
#"get_local", "set_local", "tee_local", #"get_local", "set_local", "tee_local",
#"if", "loop", "block", "br", "br_if", "br_table", "return",
#"nop", "unreachable",
#"address", "align", "memory",
#"float_literals", #"float_literals",
#"globals", #"globals",
#"func", #"func",
#"if", "loop", "block", "br", "br_if", "br_table", "return",
#"nop", "unreachable",
#"float_exprs", #"float_exprs",
#"float_memory", #"float_memory",
#"elem", #"elem",

Loading…
Cancel
Save