# HG changeset patch # User Siddharth Agarwal # Date 1352576261 28800 # Node ID 5a89f52176252d5c3c21570fec419e54c9e99edd # Parent b2bd669641d362f3734d8b75869b0d14facd7035 run-tests: open child-parent pipes in binary mode Python's pickle is a binary format. [ original upstream message ] diff -r b2bd669641d3 -r 5a89f5217625 tests/run-tests.py --- a/tests/run-tests.py Fri Nov 09 14:49:30 2012 -0800 +++ b/tests/run-tests.py Sat Nov 10 11:37:41 2012 -0800 @@ -1071,7 +1071,7 @@ 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 @@ 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)