Changeset 5b993e0 for tests/test.py


Ignore:
Timestamp:
Mar 25, 2019, 12:05:29 PM (5 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d3c1c6a
Parents:
d4a60ac
Message:

Updated test scripts to use python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test.py

    rd4a60ac r5b993e0  
    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)
     
    281280        elif options.list :
    282281                print("Listing for %s:%s"% (settings.arch.string, settings.debug.string))
    283                 fancy_print("\n".join(map(lambda t: "%s" % (t.toString()), tests)))
     282                fancy_print("\n".join(map(lambda t: t.toString(), tests)))
    284283
    285284        else :
Note: See TracChangeset for help on using the changeset viewer.