@@ -635,9 +635,10 @@ def main() -> int:
635635 arg_parser .error ('Cannot use --wipe and --keep-results' )
636636
637637 # Args are OK if we get here.
638+ total_passed_count : int = 0
638639 total_skipped_count : int = 0
639640 total_ignore_count : int = 0
640- total_fail_count : int = 0
641+ total_failed_count : int = 0
641642
642643 # Check CWD
643644 if not _check_cwd ():
@@ -664,11 +665,11 @@ def main() -> int:
664665 msg : str = 'test' if num_tests == 1 else 'tests'
665666 print (f'# Found { num_tests } { msg } ' )
666667 if args .collection :
667- print (f'# Limiting to Collection { args .collection } ' )
668+ print (f'# Limiting to Collection " { args .collection } " ' )
668669 if args .job :
669- print (f'# Limiting to Job { args .job } ' )
670+ print (f'# Limiting to Job " { args .job } " ' )
670671 if args .test :
671- print (f'# Limiting to Test { args .test } ' )
672+ print (f'# Limiting to Test " { args .test } " ' )
672673
673674 if job_definitions :
674675 # There is at least one job-definition with a test
@@ -687,14 +688,15 @@ def main() -> int:
687688 continue
688689
689690 if job_definition .jobs [job_name ].tests :
690- _ , num_skipped , num_ignored , num_failed = \
691+ num_passed , num_skipped , num_ignored , num_failed = \
691692 _test (args ,
692693 collection ,
693694 job_name ,
694695 job_definition .jobs [job_name ])
696+ total_passed_count += num_passed
695697 total_skipped_count += num_skipped
696698 total_ignore_count += num_ignored
697- total_fail_count += num_failed
699+ total_failed_count += num_failed
698700
699701 # Break out of this loop if told to stop on failures
700702 if num_failed > 0 and args .exit_on_failure :
@@ -707,25 +709,24 @@ def main() -> int:
707709 # Success or failure?
708710 # It's an error to find no tests.
709711 print (' ---' )
710- total_pass_count : int = num_tests - total_fail_count - total_ignore_count
711712 dry_run : str = '[DRY RUN]' if args .dry_run else ''
712- summary : str = f'passed={ total_pass_count } ' \
713+ summary : str = f'passed={ total_passed_count } ' \
713714 f' skipped={ total_skipped_count } ' \
714- f' ignored={ total_ignore_count } '
715- if total_fail_count :
716- arg_parser . error ( f'Done (FAILURE) { summary } failed= { total_fail_count } '
717- f' { dry_run } ' )
718- elif total_pass_count == 0 and not args .allow_no_tests :
715+ f' ignored={ total_ignore_count } ' \
716+ f' failed= { total_failed_count } '
717+ if total_failed_count :
718+ arg_parser . error ( f'Done (FAILURE) { summary } { dry_run } ' )
719+ elif total_passed_count == 0 and not args .allow_no_tests :
719720 arg_parser .error (f'Done (FAILURE) { summary } '
720- f' failed=0 (at least one test must pass)'
721+ f' (at least one test must pass)'
721722 f' { dry_run } ' )
722723 else :
723724 print (f'Done (OK) { summary } { dry_run } ' )
724725
725726 # Automatically wipe.
726727 # If there have been no failures
727728 # and not told to keep directories.
728- if total_fail_count == 0 and not args .keep_results :
729+ if total_failed_count == 0 and not args .keep_results :
729730 _wipe ()
730731
731732 return 0
0 commit comments