Send run_tempest.sh output to a logfile

Otherwise the run_tempest.sh output is not captured anywhere and
can not be used.
run_tempest.sh outputs the test results as well as the failures
and their traces.

Change-Id: I1894b3dd409a0978363d9e38856b2ec003d425c4
This commit is contained in:
David Moreau Simard
2015-12-11 13:40:19 -05:00
parent 5b6c0b9575
commit 084fed8f5b

View File

@@ -17,6 +17,7 @@ Plugin responsible for post-installation configuration
"""
from packstack.installer import utils
from packstack.installer import basedefs
# ------------- Postscript Packstack Plugin Initialization --------------
@@ -51,8 +52,9 @@ def initSequences(controller):
# -------------------------- step functions --------------------------
def run_tempest(config, messages):
logfile = basedefs.DIR_LOG + "/run_tempest.log"
print("Running Tempest on %s" % config['CONFIG_TEMPEST_HOST'])
server = utils.ScriptRunner(config['CONFIG_TEMPEST_HOST'])
server.append('/var/lib/tempest/run_tempest.sh -V %s'
% config['CONFIG_RUN_TEMPEST_TESTS'])
server.append('/var/lib/tempest/run_tempest.sh -V %s > %s'
% (config['CONFIG_RUN_TEMPEST_TESTS'], logfile))
server.execute()