Add code to deal with machine owners and their display
Signed-off-by: Martin J. Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1010 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/tko/display.py b/tko/display.py
index 9d85a9d..d37b8ff 100755
--- a/tko/display.py
+++ b/tko/display.py
@@ -114,6 +114,9 @@
if tests.count(test):
results.append(test)
tests.remove(test)
+ if tests.count('boot'):
+ results.append('boot')
+ tests.remove('boot')
return results + sorted(tests)
@@ -126,3 +129,15 @@
print '   '
print '<a href="machine_benchmark.cgi">Performance</a>'
print '</h2><p>'
+
+
+def group_name(group):
+ name = re.sub('_', '<br>', group.name)
+ if re.search('/', name):
+ (owner, machine) = name.split('/', 1)
+ if len(owner) > 3: # capitalize acroymns
+ owner = owner.capitalize()
+ else:
+ owner = owner.upper()
+ name = owner + '<br>' + machine
+ return name