Пример #1
0
    def test_init_reconf(self):
        # test reconf = True
        self.factory = GNUAutoconf(source=BuildStep(), reconf=True)
        self.test_init()
        reconfPresent = False
        selfreconfPresent = False

        for step in self.factory.steps:
            try:
                if step.buildStep().command[0] == 'autoreconf':
                    reconfPresent = True
            except (AttributeError, KeyError):
                pass
        self.assertTrue(reconfPresent)

        # test setting your own reconfiguration step
        self.factory = GNUAutoconf(source=BuildStep(),
                                   reconf=['notsoautoreconf'])
        self.test_init()
        for step in self.factory.steps:
            try:
                if step.buildStep().command == ['notsoautoreconf']:
                    selfreconfPresent = True
            except (AttributeError, KeyError):
                pass
        self.assertTrue(selfreconfPresent)
Пример #2
0
    def test_init_none(self):
        """Default steps can be uninitialized by setting None"""

        self.factory = GNUAutoconf(source=BuildStep(),
                                   compile=None,
                                   test=None,
                                   distcheck=None)
        for step in self.factory.steps:
            try:
                cmd = step.buildStep().command
                self.assertNotIn(cmd, [['make', 'all'], ['make', 'check'],
                                       ['make', 'distcheck']],
                                 f"Build step {cmd} should not be present.")
            except (AttributeError, KeyError):
                pass
Пример #3
0
 def setUp(self):
     self.factory = GNUAutoconf(source=BuildStep())