Skip to content

Commit

Permalink
Merge pull request #88 from stegut01/defect_2144
Browse files Browse the repository at this point in the history
Fix hanging execution of greentea/htrun
  • Loading branch information
PrzemekWirkus committed Mar 4, 2016
2 parents e39295a + 7a58b0d commit 6490704
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions mbed_greentea/mbed_greentea_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,13 +840,18 @@ def main_cli(opts, args, gt_instance_uuid=None):
for t in execute_threads:
t.daemon = True
t.start()
while test_result_queue.qsize() != len(execute_threads):
sleep(1)

# merge partial test reports from diffrent threads to final test report
for t in execute_threads:
t.join()
test_return_data = test_result_queue.get(False)
try:
t.join() #blocking
test_return_data = test_result_queue.get(False)
except Exception as e:
# No test report generated
gt_logger.gt_log_err("could not generate test report" + str(e))
test_exec_retcode += -1000
return test_exec_retcode

test_platforms_match += test_return_data['test_platforms_match']
test_exec_retcode += test_return_data['test_exec_retcode']
partial_test_report = test_return_data['test_report']
Expand Down

0 comments on commit 6490704

Please sign in to comment.