Mercurial > mozilla > hg > talosnames
comparison talosnames/api.py @ 13:323a01abd180
putting off this fun for later
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 10 Jul 2012 17:12:59 -0700 |
parents | a4aa9f83e3be |
children | 1b18b2746e69 |
comparison
equal
deleted
inserted
replaced
12:a4aa9f83e3be | 13:323a01abd180 |
---|---|
1 import os | 1 import os |
2 import re | 2 import re |
3 import require | 3 import require |
4 import subprocess | |
4 import sqlite3 | 5 import sqlite3 |
5 import sys | 6 import sys |
7 import talos | |
6 import urllib2 | 8 import urllib2 |
9 | |
10 talos_dir = os.path.dirname(os.path.abspath(talos.__file__)) | |
7 | 11 |
8 sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | 12 sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
9 | 13 |
10 class TalosNames(object): | 14 class TalosNames(object): |
11 graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql' | 15 graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql' |
90 | 94 |
91 def buildbot_command(self, name): | 95 def buildbot_command(self, name): |
92 """gets the buildbot command for a particular suite""" | 96 """gets the buildbot command for a particular suite""" |
93 return self.buildbot_commands.get(name) | 97 return self.buildbot_commands.get(name) |
94 | 98 |
99 def buildbot_config(self, name): | |
100 command = self.buildbot_command(name) | |
101 assert command is not None, "Suite not found: %s" % name | |
102 | |
95 def __call__(self, name=None): | 103 def __call__(self, name=None): |
96 retval = [] | 104 retval = [] |
97 for short_name, graphserver_name in self.names.items(): | 105 for short_name, graphserver_name in self.names.items(): |
98 if (name is None) or (name == short_name or short_name.startswith(name + '_')): | 106 if (name is None) or (name == short_name or short_name.startswith(name + '_')): |
99 retval.append((short_name, graphserver_name)) | 107 retval.append((short_name, graphserver_name)) |