The stepsecs option has no effect on the whetstone subtest, which is hardwired to a duration of 10 seconds.

This change has no effect on current uses of Unixbench or on the scores reported by those uses.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1403 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/unixbench/unixbench.py b/client/tests/unixbench/unixbench.py
index 87fbb2e..4dc380e 100755
--- a/client/tests/unixbench/unixbench.py
+++ b/client/tests/unixbench/unixbench.py
@@ -2,7 +2,7 @@
 from autotest_utils import *
 
 class unixbench(test.test):
-	version = 1
+	version = 2
 
 	# http://www.tux.org/pub/tux/niemi/unixbench/unixbench-4.1.0.tgz
 	def setup(self, tarball = 'unixbench-4.1.0.tar.bz2'):
@@ -14,13 +14,18 @@
 		system('make')
 
 
-	def execute(self, iterations = 1, args = ''):
+	def execute(self, iterations = 1, args = '', stepsecs=0):
 		vars = ('TMPDIR=\"%s\" RESULTDIR=\"%s\"' % 
 		       (self.tmpdir, self.resultsdir))
 		profilers = self.job.profilers
 		keyval = open(self.resultsdir + '/keyval', 'w')
 		self.err = None
-
+		if stepsecs:
+			# change time per subtest from unixbench's defaults of
+			#   10 secs for small tests, 30 secs for bigger tests
+			vars += ' systime=%i looper=%i seconds=%i'\
+				' dhrytime=%i arithtime=%i' \
+				% ((stepsecs,)*5) 
 		if not profilers.only():
 			for i in range(iterations):
 				os.chdir(self.srcdir)