Ejemplo n.º 1
0
 def test_release(self):
     self.assertFalse(match_run_on_projects("birch", ["release"]))
     self.assertFalse(match_run_on_projects("larch", ["release"]))
     self.assertFalse(match_run_on_projects("autoland", ["release"]))
     self.assertTrue(match_run_on_projects("mozilla-central", ["release"]))
     self.assertTrue(match_run_on_projects("mozilla-beta", ["release"]))
     self.assertTrue(match_run_on_projects("mozilla-release", ["release"]))
Ejemplo n.º 2
0
 def test_integration(self):
     self.assertFalse(match_run_on_projects("birch", ["integration"]))
     self.assertFalse(match_run_on_projects("larch", ["integration"]))
     self.assertTrue(match_run_on_projects("autoland", ["integration"]))
     self.assertFalse(
         match_run_on_projects("mozilla-central", ["integration"]))
     self.assertFalse(match_run_on_projects("mozilla-beta",
                                            ["integration"]))
     self.assertFalse(
         match_run_on_projects("mozilla-integration", ["integration"]))
Ejemplo n.º 3
0
 def __call__(self, graph_name, graph, graph_config, parameters):
     for verification in self._verifications.get(graph_name, []):
         if not match_run_on_projects(parameters["project"],
                                      verification.run_on_projects):
             continue
         scratch_pad = {}
         graph.for_each_task(
             verification.verify,
             scratch_pad=scratch_pad,
             graph_config=graph_config,
             parameters=parameters,
         )
         verification.verify(
             None,
             graph,
             scratch_pad=scratch_pad,
             graph_config=graph_config,
             parameters=parameters,
         )
     return graph_name, graph
Ejemplo n.º 4
0
 def test_empty(self):
     self.assertFalse(match_run_on_projects("birch", []))
Ejemplo n.º 5
0
def filter_for_project(task, parameters):
    """Filter tasks by project.  Optionally enable nightlies."""
    run_on_projects = set(task.attributes.get("run_on_projects", []))
    return match_run_on_projects(parameters["project"], run_on_projects)
Ejemplo n.º 6
0
 def filter_for_target_project(task):
     """Filter tasks by project.  Optionally enable nightlies."""
     run_on_projects = set(task.attributes.get("run_on_projects", []))
     return match_run_on_projects(target_project, run_on_projects)