From d6997d317685353482a0aa7a18408c1313583460 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Thu, 13 Feb 2014 22:56:29 +0000 Subject: [PATCH] Fix tee statement for catching tempest output The use of exec and tee doesn't seem to be quite right, and was unreliable in terms of catching the exit status of the tempest test as well as not catching the output when things went wrong. This changes the way we do the redirect and the tee to something that should be more robust and seems to work reliably in testing. Change-Id: Ieb9d725839fb8e3f9e2e63a2b7b2e9c7c86713a2 --- driver_certs/cinder_driver_cert.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/driver_certs/cinder_driver_cert.sh b/driver_certs/cinder_driver_cert.sh index edcc6d4800..8380deea42 100755 --- a/driver_certs/cinder_driver_cert.sh +++ b/driver_certs/cinder_driver_cert.sh @@ -89,9 +89,8 @@ start_cinder sleep 5 # run tempest api/volume/test_* -log_message "Run the actual tempest volume tests (./tools/pretty_tox.sh api.volume_*)...", True -exec 2> >(tee -a $TEMPFILE) -`./tools/pretty_tox.sh api.volume` +log_message "Run the actual tempest volume tests (./tools/pretty_tox.sh api.volume)...", True +./tools/pretty_tox.sh api.volume 2>&1 | tee -a $TEMPFILE if [[ $? = 0 ]]; then log_message "CONGRATULATIONS!!! Device driver PASSED!", True log_message "Submit output: ($TEMPFILE)"