# HG changeset patch # User Siddharth Agarwal # Date 2012-11-10 19:37:41 # Node ID 2631b3576a3360477fb040f1000cdfb7debdbc91 # Parent 1e6b5faf9d4ecc3022e207135e742468467c9b8f run-tests: open child-parent pipes in binary mode Python's pickle is a binary format. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1071,7 +1071,7 @@ def runchildren(options, tests): childopts += ['--tmpdir', childtmp] cmdline = [PYTHON, sys.argv[0]] + opts + childopts + job vlog(' '.join(cmdline)) - fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'r') + fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'rb') os.close(wfd) signal.signal(signal.SIGINT, signal.SIG_IGN) failures = 0 @@ -1155,7 +1155,7 @@ def runtests(options, tests): ignored = len(results['i']) if options.child: - fp = os.fdopen(options.child, 'w') + fp = os.fdopen(options.child, 'wb') pickle.dump(results, fp, pickle.HIGHEST_PROTOCOL) if options.time: pickle.dump(times, fp, pickle.HIGHEST_PROTOCOL)