Mercurial > mozilla > hg > talosnames
diff talosnames/api.py @ 16:1713b3e244a7
add some things
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 10 Jul 2012 18:18:42 -0700 |
parents | 1b18b2746e69 |
children | 25e91fc7ff01 |
line wrap: on
line diff
--- a/talosnames/api.py Tue Jul 10 18:10:39 2012 -0700 +++ b/talosnames/api.py Tue Jul 10 18:18:42 2012 -0700 @@ -5,7 +5,14 @@ import sqlite3 import sys import talos +import tempfile import urllib2 +import yaml + +try: + call = subprocess.check_call +except: + call = subprocess.call talos_dir = os.path.dirname(os.path.abspath(talos.__file__)) @@ -100,6 +107,12 @@ """returns talos configuration for suite `name`""" command = self.buildbot_command(name) assert command is not None, "Suite not found: %s" % name + outfile = tempfile.mktemp(suffix='.yml') + command += ['-o', outfile] # add an output file + command += ['-e', sys.executable] # add a pretend firefox so PerfConfigurator won't whine + call(['PerfConfigurator'] + command, stdout=subprocess.PIPE, cwd=talos_dir) + assert os.path.exists(outfile) + config = yaml.load(file(outfile)) def __call__(self, name=None): retval = []