Example #1
0
 def testCreateRmakeJobForAllPackages(self):
     handle = self.getRbuildHandle()
     from rbuild_plugins.build import packages
     handle.productStore = mock.MockObject()
     handle.productStore.getGroupFlavors._mock.setReturn([])
     packageRecipes = {'foo': self.workDir + '/foo/foo.recipe'}
     handle.productStore.getEditedRecipeDicts._mock.setReturn(
         (packageRecipes, {}))
     mock.mock(packages, '_addInEditedPackages', 'return')
     rc = packages.createRmakeJobForAllPackages(handle)
     assert (rc == 'return')
     handle.productStore.getEditedRecipeDicts._mock.setReturn(({}, {}))
     err = self.assertRaises(errors.PluginError,
                             packages.createRmakeJobForAllPackages, handle)
     assert (str(err) == ('no packages are currently being edited'
                          ' - nothing to build'))
Example #2
0
 def testCreateRmakeJobForAllPackages(self):
     handle = self.getRbuildHandle()
     from rbuild_plugins.build import packages
     handle.productStore = mock.MockObject()
     handle.productStore.getGroupFlavors._mock.setReturn([])
     packageRecipes = {'foo' : self.workDir + '/foo/foo.recipe'}
     handle.productStore.getEditedRecipeDicts._mock.setReturn(
                                                     (packageRecipes, {}))
     mock.mock(packages, '_addInEditedPackages', 'return')
     rc = packages.createRmakeJobForAllPackages(handle)
     assert(rc == 'return')
     handle.productStore.getEditedRecipeDicts._mock.setReturn(
                                                     ({}, {}))
     err = self.assertRaises(errors.PluginError,
                             packages.createRmakeJobForAllPackages, handle)
     assert(str(err) == ('no packages are currently being edited'
                         ' - nothing to build'))
Example #3
0
 def createJobForAllPackages(self):
     return packages.createRmakeJobForAllPackages(self.handle)
Example #4
0
 def createJobForAllPackages(self):
     return packages.createRmakeJobForAllPackages(self.handle)