Commit 2343b622 authored by Łukasz Nowak's avatar Łukasz Nowak

Always provide try information

parent a64d5e8c
...@@ -125,7 +125,7 @@ def main(): ...@@ -125,7 +125,7 @@ def main():
error_count=0 error_count=0
) )
finished = False finished = False
status_dict['stdout'] = 'Build not yet successful.' status_dict['stdout'] = try_info + ' Build not yet successful.'
print(try_info + ' %r: Found not yet finished run.' % (result_file,)) print(try_info + ' %r: Found not yet finished run.' % (result_file,))
elif "\"msg\": \"[u'Build successful, connect to:', u'" in result: elif "\"msg\": \"[u'Build successful, connect to:', u'" in result:
# success # success
...@@ -137,7 +137,7 @@ def main(): ...@@ -137,7 +137,7 @@ def main():
) )
finished = True finished = True
print(try_info + ' %r: Found finished successful run.' % (result_file,)) print(try_info + ' %r: Found finished successful run.' % (result_file,))
status_dict['stdout'] = 'Build successful.' status_dict['stdout'] = try_info + ' Build successful.'
break break
else: else:
# unknown # unknown
...@@ -148,7 +148,7 @@ def main(): ...@@ -148,7 +148,7 @@ def main():
error_count=1 error_count=1
) )
status_dict['stdout'] = \ status_dict['stdout'] = \
'Cannot find success nor failure result in the output' try_info + ' Cannot find success nor failure result in the output'
print(try_info + ' %r: Found unknown run.' % (result_file,)) print(try_info + ' %r: Found unknown run.' % (result_file,))
finished = False finished = False
if finished: if finished:
...@@ -156,12 +156,13 @@ def main(): ...@@ -156,12 +156,13 @@ def main():
if try_num >= try_amount: if try_num >= try_amount:
msg = try_info + ' Time exceeded, success not found.' msg = try_info + ' Time exceeded, success not found.'
print(msg) print(msg)
status_dict['stderr'] = msg status_dict.setdefault('stdout', '')
status_dict['stdout'] = '\n'.join([status_dict['stdout'], msg])
break break
try_num += 1 try_num += 1
sleep(10) sleep(10)
if not result_found: if not result_found:
status_dict['stdout'] = 'Test timed out and no result found.' status_dict['stdout'] = try_info + ' Test timed out and no result found.'
status_dict.update( status_dict.update(
test_count=1, test_count=1,
skip_count=0, skip_count=0,
......
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