# HG changeset patch # User Jeff Hammel # Date 1342120061 25200 # Node ID c6a042aad73970f7dfed3f078fe7630cc5be4c2f # Parent 6ec941f8704aa9fb72990cc7c04847fbd9fd63e4 fix some things diff -r 6ec941f8704a -r c6a042aad739 talosnames/api.py --- a/talosnames/api.py Tue Jul 10 23:19:29 2012 -0700 +++ b/talosnames/api.py Thu Jul 12 12:07:41 2012 -0700 @@ -135,9 +135,16 @@ return retval def __call__(self, name=None): + """returns the graphserver name prefixed with `name`""" + retval = [] for short_name, graphserver_name in self.names.items(): if (name is None) or (name == short_name or short_name.startswith(name + '_')): retval.append((short_name, graphserver_name)) retval.sort(key=lambda x: x[0]) return retval + + def graphserver_name(self, name): + for short_name, graphserver_name in self.names.items(): + if name == short_name: + return (short_name, graphserver_name) diff -r 6ec941f8704a -r c6a042aad739 talosnames/templates/index.html --- a/talosnames/templates/index.html Tue Jul 10 23:19:29 2012 -0700 +++ b/talosnames/templates/index.html Thu Jul 12 12:07:41 2012 -0700 @@ -36,6 +36,8 @@ Buildbot Suite Buildbot Command TBPL Name + Paint + Chrome Talos Tests {{for suite in suites}} @@ -43,6 +45,8 @@ {{suite}} {{repr(commands[suite])}} {{tbpl[suite]}} + {{paint[suite]}} + {{chrome[suite]}} {{if tests.get(suite)}} @@ -63,7 +67,7 @@
- {{for name, longname in api(test)}} + {{for name, longname in graphserver[suite][test]}}
{{name}}
{{longname}}
{{endfor}} diff -r 6ec941f8704a -r c6a042aad739 talosnames/web.py --- a/talosnames/web.py Tue Jul 10 23:19:29 2012 -0700 +++ b/talosnames/web.py Thu Jul 12 12:07:41 2012 -0700 @@ -38,6 +38,28 @@ 'api': self.api } + paint = {} + chrome = {} + graphserver = {} + for suite in suites: + for test in tests.get(suite) or []: + config = self.api.talos_config(suite) + _paint = '--mozAfterPaint' in self.data['commands'][suite] + _chrome = '--noChrome' not in self.data['commands'][suite] + extension = config.get('test_name_extension', '') + _extension = '' + if not _chrome: + _extension += '_nochrome' + if _paint: + _extension += '_paint' + if extension != _extension: + raise AssertionError + paint[suite] = _paint + chrome[suite] = _chrome + graphserver.setdefault(suite, {})[test] = [self.api.graphserver_name(test + extension) or ('','')] + self.data['graphserver'] = graphserver + self.data['paint'] = paint + self.data['chrome'] = chrome def __call__(self, environ, start_response): request = Request(environ)