comparison tests/run-tests.py @ 18448:e760414be201

run-tests.py: backout "don't use console for stdin when running in debug mode" f5842787a958 caused that some kind of interactive debugging no longer was possible - such as running hg with --debugger in a test run with run-tests.py --debug .
author Mads Kiilerich <madski@unity3d.com>
date Fri, 18 Jan 2013 01:16:16 +0100
parents e389a25e7e60
children 20462259b92a
comparison
equal deleted inserted replaced
18447:7159426c8d13 18448:e760414be201
749 def run(cmd, wd, options, replacements): 749 def run(cmd, wd, options, replacements):
750 """Run command in a sub-process, capturing the output (stdout and stderr). 750 """Run command in a sub-process, capturing the output (stdout and stderr).
751 Return a tuple (exitcode, output). output is None in debug mode.""" 751 Return a tuple (exitcode, output). output is None in debug mode."""
752 # TODO: Use subprocess.Popen if we're running on Python 2.4 752 # TODO: Use subprocess.Popen if we're running on Python 2.4
753 if options.debug: 753 if options.debug:
754 proc = subprocess.Popen(cmd, shell=True, cwd=wd, stdin=subprocess.PIPE) 754 proc = subprocess.Popen(cmd, shell=True, cwd=wd)
755 proc.stdin.close()
756 ret = proc.wait() 755 ret = proc.wait()
757 return (ret, None) 756 return (ret, None)
758 757
759 proc = Popen4(cmd, wd, options.timeout) 758 proc = Popen4(cmd, wd, options.timeout)
760 def cleanup(): 759 def cleanup():