summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2014-02-06 16:08:21 -0600
committerPaul J. Davis <paul.joseph.davis@gmail.com>2014-02-06 16:08:21 -0600
commit9c9c4ff1488d96eee6eeea7583ddd424ed195b1a (patch)
tree408ee549e84ccab6511ed0a5794cb84c5603974c
parent089f3adc62d1a68eb10e6dfd26c707fe264bae71 (diff)
downloadcouchdb-9c9c4ff1488d96eee6eeea7583ddd424ed195b1a.tar.gz
Allow dev/run subcommands to execute commands
This is for things like allowing tests to reboot nodes. This is extremely rudimentary currently.
-rwxr-xr-xdev/run8
1 files changed, 7 insertions, 1 deletions
diff --git a/dev/run b/dev/run
index deb2c3ac7..e59a08b54 100755
--- a/dev/run
+++ b/dev/run
@@ -201,7 +201,13 @@ def reboot_nodes():
def run_command(cmd):
- p = sp.Popen(cmd, shell=True)
+ p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sys.stderr)
+ for line in p.stdout:
+ try:
+ eval(line)
+ except:
+ traceback.print_exc()
+ exit(1)
p.wait()
exit(p.returncode)