Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test.py

    r0c13238 rd3c1c6a  
    1 #!/usr/bin/python
    2 from __future__ import print_function
     1#!/usr/bin/python3
    32
    43from pybin.tools import *
     
    102101                print('ERROR: invalid arguments', file=sys.stderr)
    103102                parser.print_help(sys.stderr)
    104                 sys.exit(1)
     103                sys.exit(1)
    105104
    106105        # script must have at least some tests to run or be listing
     
    112111        # check that exactly one of the booleans is set to true
    113112        if not sum( (listing, all_tests, some_tests, some_dirs) ) > 0 :
    114                 print('ERROR: must have option \'--all\', \'--list\', \'--include\', \'-I\' or non-empty test list', file=sys.stderr)
     113                print('''ERROR: must have option '--all', '--list', '--include', '-I' or non-empty test list''', file=sys.stderr)
    115114                parser.print_help()
    116115                sys.exit(1)
     
    189188# run a single test and handle the errors, outputs, printing, exception handling, etc.
    190189def run_test_worker(t) :
    191 
    192190        with SignalHandling():
    193191                # print formated name
    194                 name_txt = "%24s  " % t.name
     192                name_txt = '{0:{width}}  '.format(t.target(), width=settings.width)
    195193
    196194                retcode, error, duration = run_single_test(t)
     
    281279        elif options.list :
    282280                print("Listing for %s:%s"% (settings.arch.string, settings.debug.string))
    283                 fancy_print("\n".join(map(lambda t: "%s" % (t.toString()), tests)))
     281                fancy_print("\n".join(map(lambda t: t.toString(), tests)))
    284282
    285283        else :
    286284                # check the build configuration works
     285                settings.prep_output(tests)
    287286                settings.validate()
    288287
Note: See TracChangeset for help on using the changeset viewer.