diff --git a/tests/run-tests.py b/tests/run-tests.py index de45df2688a9c27e5459c739584275290063ffc5_dGVzdHMvcnVuLXRlc3RzLnB5..5fa9463309707805d3d0e98f8c2ef85bd6d889c9_dGVzdHMvcnVuLXRlc3RzLnB5 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -240,6 +240,6 @@ parser.error("sorry, coverage options do not work when --local " "is specified") - global vlog + global verbose if options.verbose: if options.jobs > 1 or options.child is not None: @@ -244,4 +244,4 @@ if options.verbose: if options.jobs > 1 or options.child is not None: - pid = "[%d]" % os.getpid() + verbose = "[%d]" % os.getpid() else: @@ -247,16 +247,5 @@ else: - pid = None - def vlog(*msg): - iolock.acquire() - if pid: - print pid, - for m in msg: - print m, - print - sys.stdout.flush() - iolock.release() - else: - vlog = lambda *msg: None + verbose = '' if options.tmpdir: options.tmpdir = os.path.expanduser(options.tmpdir) @@ -319,6 +308,18 @@ for line in difflib.unified_diff(expected, output, ref, err): sys.stdout.write(line) +verbose = False +def vlog(*msg): + if verbose is not False: + iolock.acquire() + if verbose: + print verbose, + for m in msg: + print m, + print + sys.stdout.flush() + iolock.release() + def findprogram(program): """Search PATH for a executable program""" for p in os.environ.get('PATH', os.defpath).split(os.pathsep):