Changeset 1010 for tester


Ignore:
Timestamp:
07/15/20 02:04:41 (4 years ago)
Author:
Maciej Komosinski
Message:

Print "character summary" (dot=OK) for all tests instead of just the number of failed tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester/tester.py

    r995 r1010  
    234234        tests_failed = 0
    235235        tests_total = 0
     236        dotOK = ""
    236237        for line in fin:
    237238                line = globals.stripEOL(line)
     
    278279                                tests_failed += int(not ok)
    279280                                tests_total += 1
     281                                dotOK += '.' if ok else test_name[0] if len(test_name)>0 else '?'
    280282                elif command == "RUNTEST":
    281283                        if is_test_active():
     
    288290                                tests_failed += int(not ok)
    289291                                tests_total += 1
     292                                dotOK += '.' if ok else test_name[0] if len(test_name)>0 else '?'
    290293                else:
    291294                        raise Exception("Don't know what to do with this line in test file: ", line)
    292295
    293         return (tests_failed, tests_total)
     296        return (tests_failed, tests_total, dotOK)
    294297
    295298
    296299if __name__ == "__main__":
    297         tests_failed, tests_total = main()
    298         print("%d / %d failed tests" % (tests_failed, tests_total))
     300        tests_failed, tests_total, dotOK = main()
     301        print("TestsDotOK:"+dotOK);
     302        #print("%d / %d failed tests" % (tests_failed, tests_total))
    299303        sys.exit(tests_failed)  # return the number of failed tests as exit code ("error level") to shell
Note: See TracChangeset for help on using the changeset viewer.