groups: allow the run_group function to return a result
If the function called via run_group returns a result return that
to the caller. Note that the 'value' of a void function is None,
so it is valid to not return anything.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@704 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/job.py b/client/bin/job.py
index fc0f3c7..5f825f9 100755
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -257,6 +257,7 @@
arguments for the function
"""
+ result = None
name = function.__name__
# if tag:
# name += '.' + tag
@@ -265,7 +266,7 @@
try:
self.record('START', None, name)
self.record_prefix += '\t'
- function(*args)
+ result = function(*args)
self.record_prefix = old_record_prefix
self.record('END GOOD', None, name)
except:
@@ -279,6 +280,8 @@
except:
raise TestError(name + ' failed\n' + format_error())
+ return result
+
# Check the passed kernel identifier against the command line
# and the running kernel, abort the job on missmatch.