# HG changeset patch # User Jeff Hammel # Date 1341969796 25200 # Node ID 25e91fc7ff01d4fbf59437709435d2f14c5a9a20 # Parent 1713b3e244a7ec497828c769aff45ef69b6f25e7 getting the test config now works diff -r 1713b3e244a7 -r 25e91fc7ff01 talosnames/api.py --- 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 = [] diff -r 1713b3e244a7 -r 25e91fc7ff01 talosnames/main.py --- 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)