Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test.py

    rd3c1c6a r0c13238  
    1 #!/usr/bin/python3
     1#!/usr/bin/python
     2from __future__ import print_function
    23
    34from pybin.tools import *
     
    101102                print('ERROR: invalid arguments', file=sys.stderr)
    102103                parser.print_help(sys.stderr)
    103                 sys.exit(1)
     104                sys.exit(1)
    104105
    105106        # script must have at least some tests to run or be listing
     
    111112        # check that exactly one of the booleans is set to true
    112113        if not sum( (listing, all_tests, some_tests, some_dirs) ) > 0 :
    113                 print('''ERROR: must have option '--all', '--list', '--include', '-I' or non-empty test list''', file=sys.stderr)
     114                print('ERROR: must have option \'--all\', \'--list\', \'--include\', \'-I\' or non-empty test list', file=sys.stderr)
    114115                parser.print_help()
    115116                sys.exit(1)
     
    188189# run a single test and handle the errors, outputs, printing, exception handling, etc.
    189190def run_test_worker(t) :
     191
    190192        with SignalHandling():
    191193                # print formated name
    192                 name_txt = '{0:{width}}  '.format(t.target(), width=settings.width)
     194                name_txt = "%24s  " % t.name
    193195
    194196                retcode, error, duration = run_single_test(t)
     
    279281        elif options.list :
    280282                print("Listing for %s:%s"% (settings.arch.string, settings.debug.string))
    281                 fancy_print("\n".join(map(lambda t: t.toString(), tests)))
     283                fancy_print("\n".join(map(lambda t: "%s" % (t.toString()), tests)))
    282284
    283285        else :
    284286                # check the build configuration works
    285                 settings.prep_output(tests)
    286287                settings.validate()
    287288
Note: See TracChangeset for help on using the changeset viewer.