Risk: Low
Visibility: The bonnie, dbench, reaim, sysbench and tbench tests will
all include their test output in stdout/stderr again.
Modified the recent changes to the benchmarks that converted
system -> system_output to also make use of the retain_output
parameter on system_output that also sends the std* of the commands
to the autotest std*. This also changes the accumulation of the
results to use a list which is concatenated at the end, rather than
concatenating strings as the output is generated.
Signed-off-by: John Admanski <[email protected]>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1524 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/sysbench/sysbench.py b/client/tests/sysbench/sysbench.py
index 968ba5e..219b008 100644
--- a/client/tests/sysbench/sysbench.py
+++ b/client/tests/sysbench/sysbench.py
@@ -85,25 +85,28 @@
if read_only:
cmd = cmd + ' --oltp-read-only=on'
+ results = []
+
profilers = self.job.profilers
if not profilers.only():
- results = system_output(cmd + ' run') + '\n'
+ results.append(system_output(cmd + ' run',
+ retain_output=True))
# Do a profiling run if necessary
if profilers.present():
profilers.start(self)
- results = "Profiling run ...\n"
- results += system_output(cmd + ' run') + '\n'
+ results.append("Profiling run ...")
+ results.append(system_output(cmd + ' run',
+ retain_output=True))
profilers.stop(self)
profilers.report(self)
except:
system(self.sudo + bin + '/pg_ctl -D ' + data + ' stop')
raise
- print results
system(self.sudo + bin + '/pg_ctl -D ' + data + ' stop')
- self.__format_results(results)
+ self.__format_results("\n".join(results))
def execute_mysql(self, build, num_threads, max_time, read_only, args):
@@ -142,25 +145,28 @@
if read_only:
cmd = cmd + ' --oltp-read-only=on'
+ results = []
+
profilers = self.job.profilers
if not profilers.only():
- results = system(cmd + ' run') + '\n'
+ results.append(system_output(cmd + ' run',
+ retain_output=True))
# Do a profiling run if necessary
if profilers.present():
profilers.start(self)
- results = "Profiling run ...\n"
- results += system_output(cmd + ' run') + '\n'
+ results.append("Profiling run ...")
+ results.append(system_output(cmd + ' run',
+ retain_output=True))
profilers.stop(self)
profilers.report(self)
except:
system(bin + '/mysqladmin shutdown')
raise
- print results
system(bin + '/mysqladmin shutdown')
- self.__format_results(results)
+ self.__format_results("\n".join(results))
def __format_results(self, results):
@@ -180,4 +186,3 @@
print >> out, 'threads=%s\ntps=%s' % (threads, tps)
out.close()
-