Changes in tests/test.py [0c13238:d3c1c6a]
- 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 3 2 4 3 from pybin.tools import * … … 102 101 print('ERROR: invalid arguments', file=sys.stderr) 103 102 parser.print_help(sys.stderr) 104 103 sys.exit(1) 105 104 106 105 # script must have at least some tests to run or be listing … … 112 111 # check that exactly one of the booleans is set to true 113 112 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) 115 114 parser.print_help() 116 115 sys.exit(1) … … 189 188 # run a single test and handle the errors, outputs, printing, exception handling, etc. 190 189 def run_test_worker(t) : 191 192 190 with SignalHandling(): 193 191 # print formated name 194 name_txt = "%24s " % t.name192 name_txt = '{0:{width}} '.format(t.target(), width=settings.width) 195 193 196 194 retcode, error, duration = run_single_test(t) … … 281 279 elif options.list : 282 280 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))) 284 282 285 283 else : 286 284 # check the build configuration works 285 settings.prep_output(tests) 287 286 settings.validate() 288 287
Note:
See TracChangeset
for help on using the changeset viewer.