capture resetswift output in probetests

This change makes the dots prettier during probetests

When calling the resetswift script, the probetests will use subprocess
to redirect stderr to stdout and capture stdout into a buffer.  We print
the captured buffer from resetswift's combined stdout/stderr and let
nosetests stdout capturing handle printing the output for debug only if a
test fails.

Change-Id: I022512f2ef5a4c43b0e49264bad1bca98c1f0299
This commit is contained in:
clayg 2012-11-26 12:28:33 -08:00
parent 13937ad696
commit b852f2274b
1 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,7 @@
from httplib import HTTPConnection
from os import kill
from signal import SIGTERM
from subprocess import call, Popen
from subprocess import Popen, PIPE, STDOUT
from time import sleep, time
from swiftclient import get_auth, head_account
@ -122,7 +122,9 @@ def kill_nonprimary_server(primary_nodes, port2server, pids):
def reset_environment():
call(['resetswift'])
p = Popen("resetswift 2>&1", shell=True, stdout=PIPE)
stdout, _stderr = p.communicate()
print stdout
pids = {}
try:
port2server = {}