tests/run-tests.py
branchstable
changeset 946 b6a39effa432
parent 945 83e828101e3c
child 947 23f0eeb598b5
equal deleted inserted replaced
945:83e828101e3c 946:b6a39effa432
   636 def run(cmd, wd, options, replacements):
   636 def run(cmd, wd, options, replacements):
   637     """Run command in a sub-process, capturing the output (stdout and stderr).
   637     """Run command in a sub-process, capturing the output (stdout and stderr).
   638     Return a tuple (exitcode, output).  output is None in debug mode."""
   638     Return a tuple (exitcode, output).  output is None in debug mode."""
   639     # TODO: Use subprocess.Popen if we're running on Python 2.4
   639     # TODO: Use subprocess.Popen if we're running on Python 2.4
   640     if options.debug:
   640     if options.debug:
   641         proc = subprocess.Popen(cmd, shell=True)
   641         proc = subprocess.Popen(cmd, shell=True, cwd=wd)
   642         ret = proc.wait()
   642         ret = proc.wait()
   643         return (ret, None)
   643         return (ret, None)
   644 
   644 
   645     proc = Popen4(cmd, wd, options.timeout)
   645     proc = Popen4(cmd, wd, options.timeout)
   646     def cleanup():
   646     def cleanup():