summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorapw <apw@592f7852-d20e-0410-864c-8624ca9c26a4>2007-09-27 17:18:01 +0000
committerapw <apw@592f7852-d20e-0410-864c-8624ca9c26a4>2007-09-27 17:18:01 +0000
commitbc8da433d5d7676c016f3f0c4bf2d04ca1586005 (patch)
treee12796e2614f91c34bdc72826d4c97f47be4512e /client
parent80857827d433528b07ef83a6314e42d6428698e6 (diff)
groups: allow the caller to specify the tag for the group
Allow the group tag to be overridden via a tag= argument. The default remains the name of the group function. Signed-off-by: Andy Whitcroft <apw@shadowen.org> git-svn-id: svn://test.kernel.org/autotest/trunk@705 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'client')
-rwxr-xr-xclient/bin/job.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/bin/job.py b/client/bin/job.py
index 5f825f96..fd010e0d 100755
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -249,7 +249,7 @@ class job:
return 1
- def run_group(self, function, *args):
+ def run_group(self, function, *args, **dargs):
"""\
function:
subroutine to run
@@ -259,6 +259,14 @@ class job:
result = None
name = function.__name__
+
+ # Allow the tag for the group to be specified.
+ if dargs.has_key('tag'):
+ tag = dargs['tag']
+ del dargs['tag']
+ if tag:
+ name = tag
+
# if tag:
# name += '.' + tag
old_record_prefix = self.record_prefix
@@ -266,7 +274,7 @@ class job:
try:
self.record('START', None, name)
self.record_prefix += '\t'
- result = function(*args)
+ result = function(*args, **dargs)
self.record_prefix = old_record_prefix
self.record('END GOOD', None, name)
except: