Commit 0db8d0b5 authored by Jérome Perrin's avatar Jérome Perrin

test_result: a test cannot be successful if there are unknown test result lines

parent a463bc45
......@@ -55,7 +55,7 @@ kw = sci[\'kwargs\']\n
stop_date = kw.get(\'date\') or DateTime()\n
test_result.setStopDate(stop_date)\n
if test_result.getPortalType() == \'Test Result\':\n
if test_result:\n
has_unknown_result = False\n
edit_kw = dict(duration=0,\n
all_tests=0,\n
errors=0,\n
......@@ -64,7 +64,8 @@ if test_result.getPortalType() == \'Test Result\':\n
for line in test_result.objectValues(portal_type=\'Test Result Line\'):\n
for prop in edit_kw:\n
edit_kw[prop] = edit_kw[prop] + line.getProperty(prop, 0)\n
if edit_kw[\'errors\'] or edit_kw[\'failures\']:\n
has_unknown_result = has_unknown_result or line.getStringIndex() == 'UNKNOWN'\n
if has_unknown_result or edit_kw[\'errors\'] or edit_kw[\'failures\']:\n
status = \'FAIL\'\n
else:\n
status = \'PASS\'\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment