Merge "Add stdout logging for stress"
diff --git a/tempest/cmd/run_stress.py b/tempest/cmd/run_stress.py
index 5c6f200..943fe5b 100644
--- a/tempest/cmd/run_stress.py
+++ b/tempest/cmd/run_stress.py
@@ -22,6 +22,7 @@
except ImportError:
# unittest in python 2.6 does not contain loader, so uses unittest2
from unittest2 import loader
+import traceback
from cliff import command
from oslo_log import log as logging
@@ -79,7 +80,13 @@
return pa
def take_action(self, pa):
- return action(pa)
+ try:
+ action(pa)
+ except Exception:
+ LOG.exception("Failure in the stress test framework")
+ traceback.print_exc()
+ raise
+ return 0
def get_description(self):
return 'Run tempest stress tests'
@@ -152,4 +159,5 @@
sys.exit(main())
except Exception:
LOG.exception("Failure in the stress test framework")
+ traceback.print_exc()
sys.exit(1)
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index a550d71..4dcaab7 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -239,14 +239,13 @@
had_errors = True
sum_runs += process['statistic']['runs']
sum_fails += process['statistic']['fails']
- LOG.info(" Process %d (%s): Run %d actions (%d failed)" %
- (process['p_number'],
- process['action'],
- process['statistic']['runs'],
- process['statistic']['fails']))
- LOG.info("Summary:")
- LOG.info("Run %d actions (%d failed)" %
- (sum_runs, sum_fails))
+ print ("Process %d (%s): Run %d actions (%d failed)" % (
+ process['p_number'],
+ process['action'],
+ process['statistic']['runs'],
+ process['statistic']['fails']))
+ print ("Summary:")
+ print ("Run %d actions (%d failed)" % (sum_runs, sum_fails))
if not had_errors and CONF.stress.full_clean_stack:
LOG.info("cleaning up")