Skip to content

Commit

Permalink
improve unexpected error report
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Aug 24, 2020
1 parent 3e462a0 commit 2e4f4cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/python/iutest_compile_error_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ def test_result(result, msg, e):

def iutest(l):
result = True
unexpected = []
re_iutest = re.compile(r'IUTEST_TEST_COMPILEERROR\( ([^#]*) \)')
checkList = []
messageList = []
Expand Down Expand Up @@ -473,8 +474,7 @@ def iutest(l):
check.msg.checked = True
break
if msg.is_tail() and not msg.is_checked():
dump_msgs(msg)
result = False
unexpected.append(msg)
elif msg.is_warning():
dump_msg(msg)

Expand All @@ -484,6 +484,9 @@ def iutest(l):
else:
test_result(False, check.expression, check.msg)
result = False
for msg in unexpected:
test_result(False, "Unexpected error: " + msg.message, msg)
result = False
return result


Expand Down

0 comments on commit 2e4f4cf

Please sign in to comment.