# HG changeset patch # User Patrick Mezard # Date 1305575548 -7200 # Node ID 83e828101e3c1f38626e4d09af7e176d99e799a3 # Parent 37aff8ccb33e259b963b9b4e6bb3feb7217eee21 run-tests: use the common test path on Windows and Java The alternate one did not run in the test directory and controlling the jobs execution with threads instead of process made it harder to fix. [ original upstream message ] diff -r 37aff8ccb33e -r 83e828101e3c tests/run-tests.py --- a/tests/run-tests.py Mon May 16 21:41:46 2011 +0200 +++ b/tests/run-tests.py Mon May 16 21:52:28 2011 +0200 @@ -642,45 +642,37 @@ ret = proc.wait() return (ret, None) - if os.name == 'nt' or sys.platform.startswith('java'): - tochild, fromchild = os.popen4(cmd) - tochild.close() - output = fromchild.read() - ret = fromchild.close() - if ret is None: - ret = 0 - else: - proc = Popen4(cmd, wd, options.timeout) - def cleanup(): - try: - proc.terminate() - except OSError: - pass - ret = proc.wait() - if ret == 0: - ret = signal.SIGTERM << 8 - killdaemons() - return ret + proc = Popen4(cmd, wd, options.timeout) + def cleanup(): + try: + proc.terminate() + except OSError: + pass + ret = proc.wait() + if ret == 0: + ret = signal.SIGTERM << 8 + killdaemons() + return ret + + output = '' + proc.tochild.close() - output = '' - proc.tochild.close() - - try: - output = proc.fromchild.read() - except KeyboardInterrupt: - vlog('# Handling keyboard interrupt') - cleanup() - raise + try: + output = proc.fromchild.read() + except KeyboardInterrupt: + vlog('# Handling keyboard interrupt') + cleanup() + raise - ret = proc.wait() - if wifexited(ret): - ret = os.WEXITSTATUS(ret) + ret = proc.wait() + if wifexited(ret): + ret = os.WEXITSTATUS(ret) - if proc.timeout: - ret = 'timeout' + if proc.timeout: + ret = 'timeout' - if ret: - killdaemons() + if ret: + killdaemons() for s, r in replacements: output = re.sub(s, r, output)