Exemplo n.º 1
0
    def test_collisions_between_two_parts(self):
        with self.assertRaises(EnvironmentError) as raised:
            pluginhandler.check_for_collisions(
                [self.part1, self.part2, self.part3])

        self.assertEqual(
            raised.exception.__str__(),
            "Parts 'part2' and 'part3' have the following file paths in "
            "common which have different contents:\n1\na/2")
Exemplo n.º 2
0
    def test_collisions_between_two_parts(self):
        with self.assertRaises(EnvironmentError) as raised:
            pluginhandler.check_for_collisions(
                [self.part1, self.part2, self.part3])

        self.assertEqual(
            raised.exception.__str__(),
            "Parts 'part2' and 'part3' have the following file paths in "
            "common which have different contents:\n1\na/2")
Exemplo n.º 3
0
    def run(self, step, part_names=None, recursed=False):
        if part_names:
            self.config.validate_parts(part_names)
            parts = {p for p in self.config.all_parts if p.name in part_names}
        else:
            parts = self.config.all_parts
            part_names = self.config.part_names

        dirty = {p.name for p in parts if p.should_step_run('stage')}
        step_index = common.COMMAND_ORDER.index(step) + 1

        for step in common.COMMAND_ORDER[0:step_index]:
            if step == 'stage':
                pluginhandler.check_for_collisions(self.config.all_parts)
            for part in parts:
                self._run_step(step, part, part_names, dirty, recursed)

        self._create_meta(step, part_names)
Exemplo n.º 4
0
    def run(self, step, part_names=None, recursed=False):
        if part_names:
            self.config.validate_parts(part_names)
            parts = {p for p in self.config.all_parts if p.name in part_names}
        else:
            parts = self.config.all_parts
            part_names = self.config.part_names

        dirty = {p.name for p in parts if p.should_step_run('stage')}
        step_index = common.COMMAND_ORDER.index(step) + 1

        for step in common.COMMAND_ORDER[0:step_index]:
            if step == 'stage':
                pluginhandler.check_for_collisions(self.config.all_parts)
            for part in parts:
                self._run_step(step, part, part_names, dirty, recursed)

        self._create_meta(step, part_names)
Exemplo n.º 5
0
 def test_no_collisions(self):
     """No exception is expected as there are no collisions."""
     pluginhandler.check_for_collisions([self.part1, self.part2])
Exemplo n.º 6
0
 def test_no_collisions(self):
     """No exception is expected as there are no collisions."""
     pluginhandler.check_for_collisions([self.part1, self.part2])