# HG changeset patch # User Jeff Hammel # Date 1341965579 25200 # Node ID 323a01abd18031d23ba0b954092deca912ba2035 # Parent a4aa9f83e3bea8c5ce8c8017858dd5da31564749 putting off this fun for later diff -r a4aa9f83e3be -r 323a01abd180 talosnames/api.py --- a/talosnames/api.py Tue Jul 10 17:01:05 2012 -0700 +++ b/talosnames/api.py Tue Jul 10 17:12:59 2012 -0700 @@ -1,10 +1,14 @@ import os import re import require +import subprocess import sqlite3 import sys +import talos import urllib2 +talos_dir = os.path.dirname(os.path.abspath(talos.__file__)) + sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) class TalosNames(object): @@ -92,6 +96,10 @@ """gets the buildbot command for a particular suite""" return self.buildbot_commands.get(name) + def buildbot_config(self, name): + command = self.buildbot_command(name) + assert command is not None, "Suite not found: %s" % name + def __call__(self, name=None): retval = [] for short_name, graphserver_name in self.names.items(): diff -r a4aa9f83e3be -r 323a01abd180 talosnames/main.py --- a/talosnames/main.py Tue Jul 10 17:01:05 2012 -0700 +++ b/talosnames/main.py Tue Jul 10 17:12:59 2012 -0700 @@ -5,8 +5,9 @@ """ import api +import optparse +import subprocess import sys -import optparse from commandparser import CommandParser from pprint import pprint @@ -34,6 +35,9 @@ def command(self, suite): """returns the command that buildbot runs for a particular suite""" + command = self.api.buildbot_command(suite) + assert command is not None, "Suite not found; should be one of %s" % ', '.join(self.suites()) + return subprocess.list2cmdline(command) def tests(self): pass