diff options
author | Paul J. Davis <paul.joseph.davis@gmail.com> | 2014-02-06 16:08:21 -0600 |
---|---|---|
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | 2014-02-06 16:08:21 -0600 |
commit | 9c9c4ff1488d96eee6eeea7583ddd424ed195b1a (patch) | |
tree | 408ee549e84ccab6511ed0a5794cb84c5603974c | |
parent | 089f3adc62d1a68eb10e6dfd26c707fe264bae71 (diff) | |
download | couchdb-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-x | dev/run | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |