Chromium Code Reviews| Index: dashboard/dashboard/pinpoint/models/job.py |
| diff --git a/dashboard/dashboard/pinpoint/models/job.py b/dashboard/dashboard/pinpoint/models/job.py |
| index 57396d37c8fc263aaec71f7ae13b5ac55c845d4d..596b31b5fff4f075840332fa8a5f7545347213b0 100644 |
| --- a/dashboard/dashboard/pinpoint/models/job.py |
| +++ b/dashboard/dashboard/pinpoint/models/job.py |
| @@ -60,8 +60,8 @@ class Job(ndb.Model): |
| # Request parameters. |
| configuration = ndb.StringProperty(required=True) |
| - test_suite = ndb.StringProperty() |
| - test = ndb.StringProperty() |
| + target = ndb.StringProperty() |
| + test_config = ndb.PickleProperty() |
|
perezju
2017/08/07 12:06:12
nit: wondering whether this should be called targe
dtu
2017/08/15 17:06:41
`target` has to be "config" object because it need
perezju
2017/08/16 08:15:25
Nice! This turned out pretty neat!
|
| metric = ndb.StringProperty() |
| # If True, the service should pick additional Changes to run (bisect). |
| @@ -75,21 +75,16 @@ class Job(ndb.Model): |
| state = ndb.PickleProperty(required=True) |
| @classmethod |
| - def New(cls, configuration, test_suite, test, metric, auto_explore, bug_id): |
| + def New(cls, configuration, target, test_config, auto_explore, bug_id): |
| # Get list of quests. |
| quests = [quest_module.FindIsolate(configuration)] |
| - if test_suite: |
| - quests.append(quest_module.RunTest(configuration, test_suite, test, |
| - _DEFAULT_REPEAT_COUNT)) |
| - if metric: |
| - quests.append(quest_module.ReadValue(metric, test)) |
| + quests += test_config.Quests() |
| # Create job. |
| return cls( |
| configuration=configuration, |
| - test_suite=test_suite, |
| - test=test, |
| - metric=metric, |
| + target=target, |
| + test_config=test_config, |
| auto_explore=auto_explore, |
| bug_id=bug_id, |
| state=_JobState(quests, _DEFAULT_ATTEMPT_COUNT)) |
| @@ -157,9 +152,8 @@ class Job(ndb.Model): |
| 'job_id': self.job_id, |
| 'configuration': self.configuration, |
| - 'test_suite': self.test_suite, |
| - 'test': self.test, |
| - 'metric': self.metric, |
| + 'target': self.target, |
| + 'test_config': self.test_config.AsDict(), |
| 'auto_explore': self.auto_explore, |
| 'created': self.created.strftime('%Y-%m-%d %H:%M:%S %Z'), |