Mercurial > mozilla > hg > talosnames
comparison talosnames/main.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 | 2fc6c53931a1 |
comparison
equal
deleted
inserted
replaced
12:a4aa9f83e3be | 13:323a01abd180 |
---|---|
3 """ | 3 """ |
4 correlate names of talos | 4 correlate names of talos |
5 """ | 5 """ |
6 | 6 |
7 import api | 7 import api |
8 import optparse | |
9 import subprocess | |
8 import sys | 10 import sys |
9 import optparse | |
10 from commandparser import CommandParser | 11 from commandparser import CommandParser |
11 from pprint import pprint | 12 from pprint import pprint |
12 | 13 |
13 class TalosNamesCLI(object): | 14 class TalosNamesCLI(object): |
14 def __init__(self): | 15 def __init__(self): |
32 suites = sorted(self.api.suites.keys()) | 33 suites = sorted(self.api.suites.keys()) |
33 return suites | 34 return suites |
34 | 35 |
35 def command(self, suite): | 36 def command(self, suite): |
36 """returns the command that buildbot runs for a particular suite""" | 37 """returns the command that buildbot runs for a particular suite""" |
38 command = self.api.buildbot_command(suite) | |
39 assert command is not None, "Suite not found; should be one of %s" % ', '.join(self.suites()) | |
40 return subprocess.list2cmdline(command) | |
37 | 41 |
38 def tests(self): | 42 def tests(self): |
39 pass | 43 pass |
40 | 44 |
41 def main(args=sys.argv[1:]): | 45 def main(args=sys.argv[1:]): |