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