Esempio n. 1
0
    def testNextVersionMultipleBranchesWithDepth2(self):
        self.addCollection('foo=/localhost@rpl:1//2//3/2:1-2-0.1', [':run'])

        repos = self.openRepository()
        sourceList = [(VFS('/localhost@rpl:2//3/1-2'), ['foo'], deps.Flavor())]
        nextVersions = nextversion.nextVersions(repos, self.openDatabase(),
                                                sourceList)
        assert(nextVersions == [VFS('/localhost@rpl:2//3/1-2-0.2')])
Esempio n. 2
0
 def testNextVersionLatestDevelOnThisBranch(self):
     # depth 3
     self.addCollection('foo=/localhost@rpl:1//2//3/1:1-2-0.0.1', [':run'])
     # depth 2 and latest
     self.addCollection('foo=/localhost@rpl:1//3/2:1-2-0.1[is:x86]', 
                        [':run'])
     sourceList = [(VFS('/localhost@rpl:1//3/1-2'), ['foo'], deps.Flavor())]
     nextVersions = nextversion.nextVersions(self.openRepository(),
                                             self.openDatabase(), sourceList)
     assert(nextVersions == [VFS('/localhost@rpl:1//3/1-2-0.1')])
Esempio n. 3
0
    def testNextVersionMultipleBranchesWithDepth(self):
        # this has depth 3, but the trove we're building has depth 2.
        # so we can't consider it the "latest" and just increment its source
        # count.
        self.addCollection('foo=/localhost@rpl:1//2//3/2:1-2-0.0.1', [':run'])

        repos = self.openRepository()
        sourceList = [(VFS('/localhost@rpl:2//3/1-2'), ['foo'], deps.Flavor())]
        nextVersions = nextversion.nextVersions(repos, self.openDatabase(),
                                                sourceList)
        assert(nextVersions == [VFS('/localhost@rpl:2//3/1-2-0.1')])
Esempio n. 4
0
 def testNextVersions(self):
     trv = self.addComponent('foo:source', '1')
     self.addComponent('foo:run', '1')
     self.addCollection('foo', '1', [':run'])
     localVersion = VFS('/local@local:COOK/1.0-1')
     sourceList = [(trv.getVersion(), ['foo'], deps.Flavor()),
                   (localVersion, ['bar'], deps.Flavor())]
     repos = self.openRepository()
     nextVersions = nextversion.nextVersions(repos, self.openDatabase(),
                                             sourceList)
     assert(nextVersions == [VFS('/localhost@rpl:linux/1-1-2'),
                             VFS('/local@local:COOK/1.0-1-1')])