Ignore:
Timestamp:
Sep 30, 2021, 2:17:03 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
96f01d7f
Parents:
056cbdb
Message:

Tests now count failures, passes, timeouts and report the number

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/test_run.py

    r056cbdb r172a88d  
    6565        def toString( cls, retcode, duration ):
    6666                if settings.generating :
    67                         if   retcode == TestResult.SUCCESS:     text = "Done   "
    68                         elif retcode == TestResult.TIMEOUT:     text = "TIMEOUT"
    69                         else :                                          text = "ERROR code %d" % retcode
     67                        if   retcode == TestResult.SUCCESS:     key = 'pass'; text = "Done   "
     68                        elif retcode == TestResult.TIMEOUT:     key = 'time'; text = "TIMEOUT"
     69                        else :  key = 'fail';   text = "ERROR code %d" % retcode
    7070                else :
    71                         if   retcode == TestResult.SUCCESS:     text = "PASSED "
    72                         elif retcode == TestResult.TIMEOUT:     text = "TIMEOUT"
    73                         else :                                          text = "FAILED with code %d" % retcode
     71                        if   retcode == TestResult.SUCCESS:     key = 'pass'; text = "PASSED "
     72                        elif retcode == TestResult.TIMEOUT:     key = 'time'; text = "TIMEOUT"
     73                        else :  key = 'fail';   text = "FAILED with code %d" % retcode
    7474
    7575                text += "    C%s - R%s" % (fmtDur(duration[0]), fmtDur(duration[1]))
    76                 return text
     76                return key, text
Note: See TracChangeset for help on using the changeset viewer.