Mercurial > mozilla > hg > talosnames
changeset 17:25e91fc7ff01
getting the test config now works
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 10 Jul 2012 18:23:16 -0700 |
parents | 1713b3e244a7 |
children | 76a8d2bd4007 |
files | talosnames/api.py talosnames/main.py |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/talosnames/api.py Tue Jul 10 18:18:42 2012 -0700 +++ b/talosnames/api.py Tue Jul 10 18:23:16 2012 -0700 @@ -41,6 +41,7 @@ self.setup_database() self.tbpl_mapping() self.setup_buildbot() + self._talos_configs = {} def setup_database(self): self.db = sqlite3.connect(':memory:') @@ -113,6 +114,15 @@ call(['PerfConfigurator'] + command, stdout=subprocess.PIPE, cwd=talos_dir) assert os.path.exists(outfile) config = yaml.load(file(outfile)) + return config + + def test_config(self, name): + test_config = self.talos_config(name)['tests'] + retval = {} + for test in test_config: + name = test.pop('name') + retval[name] = test + return retval def __call__(self, name=None): retval = []
--- a/talosnames/main.py Tue Jul 10 18:18:42 2012 -0700 +++ b/talosnames/main.py Tue Jul 10 18:23:16 2012 -0700 @@ -41,7 +41,7 @@ def tests(self, suite): """return the talos test config for a buildbot suite name""" - config = self.api.talos_config(suite) + return self.api.test_config(suite) def main(args=sys.argv[1:]): parser = CommandParser(TalosNamesCLI)