Make option to do profiling only runs.

Signed-off-by: Ameya Gujar <ameya@google.com>

For tests that are run with profiling, this patch adds the option of skipping the non-profiling run. Previously we did two runs of the test, one with profiling and the other without. Now, one can do a job.profilers.set_only (True) to run only with profiling.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@543 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/iozone/iozone.py b/client/tests/iozone/iozone.py
index 1f5f8bc..71039fe 100644
--- a/client/tests/iozone/iozone.py
+++ b/client/tests/iozone/iozone.py
@@ -26,10 +26,11 @@
 		os.chdir(dir)
 		if not args:
 			args = '-a'
-		system('%s/src/current/iozone %s' % (self.srcdir, args))
+		profilers = self.job.profilers
+		if not profilers.only():
+			system('%s/src/current/iozone %s' % (self.srcdir, args))
 
 		# Do a profiling run if necessary
-		profilers = self.job.profilers
 		if profilers.present():
 			profilers.start(self)
 			system('%s/src/current/iozone %s' % (self.srcdir, args))