# HG changeset patch # User Christian Ebert # Date 1381150293 -3600 # Node ID ce8024f2783737529f88dd7c31f5658861c3776b # Parent 115d2b6a8a9c62925751d8dca228b3c24eaef98e# Parent d69c1db7cf8b71c18cd6cb469bc1f10fd3fe79a4 Merge with stable diff -r 115d2b6a8a9c -r ce8024f27837 tests/get-with-headers.py --- a/tests/get-with-headers.py Wed Oct 02 01:22:11 2013 +0100 +++ b/tests/get-with-headers.py Mon Oct 07 13:51:33 2013 +0100 @@ -43,8 +43,9 @@ print "%s: %s" % (h, response.getheader(h)) if not headeronly: print - data = response.read() - sys.stdout.write(data) + if response.status != 500: + data = response.read() + sys.stdout.write(data) if twice and response.getheader('ETag', None): tag = response.getheader('ETag') diff -r 115d2b6a8a9c -r ce8024f27837 tests/run-tests.py --- a/tests/run-tests.py Wed Oct 02 01:22:11 2013 +0100 +++ b/tests/run-tests.py Mon Oct 07 13:51:33 2013 +0100 @@ -762,21 +762,19 @@ addsalt(n + 1, False) # Write out the script and execute it - fd, name = tempfile.mkstemp(suffix='hg-tst') - try: - for l in script: - os.write(fd, l) - os.close(fd) + name = wd + '.sh' + f = open(name, 'w') + for l in script: + f.write(l) + f.close() - cmd = '%s "%s"' % (options.shell, name) - vlog("# Running", cmd) - exitcode, output = run(cmd, wd, options, replacements, env) - # do not merge output if skipped, return hghave message instead - # similarly, with --debug, output is None - if exitcode == SKIPPED_STATUS or output is None: - return exitcode, output - finally: - os.remove(name) + cmd = '%s "%s"' % (options.shell, name) + vlog("# Running", cmd) + exitcode, output = run(cmd, wd, options, replacements, env) + # do not merge output if skipped, return hghave message instead + # similarly, with --debug, output is None + if exitcode == SKIPPED_STATUS or output is None: + return exitcode, output # Merge the script output back into a unified test