Now fixing the places where we're raising string exceptions on the
client code. The patch also fixes identation errors in the iostat
profiler and error.py'>error.py.
Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1158 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/sysbench/sysbench.py b/client/tests/sysbench/sysbench.py
index 71cc465..334114b 100644
--- a/client/tests/sysbench/sysbench.py
+++ b/client/tests/sysbench/sysbench.py
@@ -38,7 +38,7 @@
try:
system(self.sudo + '/bin/true')
except:
- raise 'Unable to run as nobody'
+ raise TestError('Unable to run as nobody')
if (db_type == 'pgsql'):
self.execute_pgsql(build, num_threads, max_time, \
@@ -86,7 +86,7 @@
cmd = cmd + ' --oltp-read-only=on'
profilers = self.job.profilers
- if not profilers.only():
+ if not profilers.only():
system(cmd + ' run')
# Do a profiling run if necessary
@@ -98,7 +98,7 @@
profilers.report(self)
except:
system(self.sudo + bin + '/pg_ctl -D ' + data + ' stop')
- raise
+ raise TestError('Unable to start postgreSQL')
system(self.sudo + bin + '/pg_ctl -D ' + data + ' stop')
@@ -154,7 +154,7 @@
profilers.report(self)
except:
system(bin + '/mysqladmin shutdown')
- raise
+ raise TestError('Unable to start mySQL')
system(bin + '/mysqladmin shutdown')