Beispiel #1
0
    def test_lock_force_supported(self):
        tito('tag --debug --accept-auto-changelog')
        builder = GitAnnexBuilder(PKG_NAME, None, self.output_dir, self.config,
                                  {}, {}, **{'offline': True})

        self.assertTrue(builder._lock_force_supported('5.20140107'))
        self.assertTrue(builder._lock_force_supported('5.20131213'))
        self.assertFalse(builder._lock_force_supported('5.20131127.1'))
        self.assertFalse(builder._lock_force_supported('3.20120522'))
    def test_lock_force_supported(self):
        tito('tag --debug --accept-auto-changelog')
        builder = GitAnnexBuilder(PKG_NAME, None, self.output_dir,
            self.config, {}, {}, **{'offline': True})

        self.assertTrue(builder._lock_force_supported('5.20140107'))
        self.assertTrue(builder._lock_force_supported('5.20131213'))
        self.assertFalse(builder._lock_force_supported('5.20131127.1'))
        self.assertFalse(builder._lock_force_supported('3.20120522'))
    def test_simple_build(self):
        run_command('git annex add %s' % self.source_filename)
        run_command('git commit -a -m "Add source."')
        # This will create 0.0.2:
        tito('tag --debug --accept-auto-changelog')
        builder = GitAnnexBuilder(PKG_NAME, None, self.output_dir,
            self.config, {}, {}, **{'offline': True})
        builder.rpm()
        self.assertEquals(1, len(list(builder.sources)))

        self.assertEquals(2, len(builder.artifacts))
        self.assertEquals(1, len(glob.glob(join(self.output_dir,
            "extsrc-0.0.2-1.*src.rpm"))))
        self.assertEquals(1, len(glob.glob(join(self.output_dir, 'noarch',
            "extsrc-0.0.2-1.*.noarch.rpm"))))
Beispiel #4
0
    def test_simple_build(self):
        run_command('git annex add %s' % self.source_filename)
        run_command('git commit -a -m "Add source."')
        # This will create 0.0.2:
        tito('tag --debug --accept-auto-changelog')
        builder = GitAnnexBuilder(PKG_NAME, None, self.output_dir, self.config,
                                  {}, {}, **{'offline': True})
        builder.rpm()
        self.assertEquals(1, len(list(builder.sources)))

        self.assertEquals(2, len(builder.artifacts))
        self.assertEquals(
            1, len(glob.glob(join(self.output_dir,
                                  "extsrc-0.0.2-1.*src.rpm"))))
        self.assertEquals(
            1,
            len(
                glob.glob(
                    join(self.output_dir, 'noarch',
                         "extsrc-0.0.2-1.*.noarch.rpm"))))