diff --git a/js/src/jit-test/jit_test.py b/js/src/jit-test/jit_test.py index c45e67e4af5..d9a1a2a783f 100755 --- a/js/src/jit-test/jit_test.py +++ b/js/src/jit-test/jit_test.py @@ -3,6 +3,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import print_function, unicode_literals + import math, os, posixpath, shlex, shutil, subprocess, sys, traceback def add_libdir_to_path(): @@ -156,7 +158,7 @@ def main(argv): test_list = [ test for test in test_list if test not in set(exclude_list) ] if not test_list: - print >> sys.stderr, "No tests found matching command line arguments." + print("No tests found matching command line arguments.", file=sys.stderr) sys.exit(0) test_list = [jittests.Test.from_file(_, options) for _ in test_list] @@ -216,9 +218,9 @@ def main(argv): if options.debug: if len(job_list) > 1: - print 'Multiple tests match command line arguments, debugger can only run one' + print('Multiple tests match command line arguments, debugger can only run one') for tc in job_list: - print ' %s' % tc.path + print(' %s' % tc.path) sys.exit(1) tc = job_list[0] @@ -238,7 +240,7 @@ def main(argv): sys.exit(2) except OSError: if not os.path.exists(prefix[0]): - print >> sys.stderr, "JS shell argument: file does not exist: '%s'" % prefix[0] + print("JS shell argument: file does not exist: '%s'" % prefix[0], file=sys.stderr) sys.exit(1) else: raise