Bug 1020110 - Handle zero test cases. r=jandem

This commit is contained in:
Lars T Hansen 2014-06-05 01:34:00 +02:00
Родитель 22f5cba2e6
Коммит d3391e4b23
1 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -477,7 +477,8 @@ def run_tests_parallel(tests, prefix, options):
try:
testcnt = 0
# Initially start as many jobs as allowed to run parallel
for i in range(min(options.max_jobs,total_tests)):
# Always enqueue at least one to avoid a curious deadlock
for i in range(max(1, min(options.max_jobs, total_tests))):
notify_queue.put(True)
# For every item in the notify queue, start one new worker.
@ -590,6 +591,16 @@ def print_test_summary(num_tests, failures, complete, doing, options):
def process_test_results(results, num_tests, options):
pb = NullProgressBar()
failures = []
timeouts = 0
complete = False
doing = 'before starting'
if num_tests == 0:
pb.finish(True)
complete = True
return print_test_summary(num_tests, failures, complete, doing, options)
if not options.hide_progress and not options.show_cmd and ProgressBar.conservative_isatty():
fmt = [
{'value': 'PASS', 'color': 'green'},
@ -599,10 +610,6 @@ def process_test_results(results, num_tests, options):
]
pb = ProgressBar(num_tests, fmt)
failures = []
timeouts = 0
complete = False
doing = 'before starting'
try:
for i, res in enumerate(results):
if options.show_output: