Exemplo n.º 1
0
    def testChooseConfigure(self):
        """testChooseConfigure."""
        p = tmp
        os.system("""
cd %s
touch configure
mkdir toto
touch toto/test
""" % (tmp))
        bd = Buildout(fp, [])
        bd.offline = False
        recipe = MinitageCommonRecipe(bd, '666', bd['part'])
        configure = recipe._choose_configure(tmp)
        self.assertEquals(configure, os.path.join(tmp, 'configure'))
        self.assertEquals(recipe.build_dir, tmp)

        recipe.build_dir = os.path.join(tmp, 'toto')
        recipe.configure = 'test'
        configure = recipe._choose_configure(recipe.build_dir)
        self.assertEquals(configure, os.path.join(tmp, 'toto', 'test'))
        self.assertEquals(recipe.build_dir, os.path.join(tmp, 'toto'))
Exemplo n.º 2
0
    def testChooseConfigure(self):
        """testChooseConfigure."""
        p = tmp
        os.system("""
cd %s
touch configure
mkdir toto
touch toto/test
""" % (tmp))
        bd = Buildout(fp, [])
        bd.offline = False
        recipe = MinitageCommonRecipe(bd, '666', bd['part'])
        configure = recipe._choose_configure(tmp)
        self.assertEquals(configure, os.path.join(tmp, 'configure'))
        self.assertEquals(recipe.build_dir, tmp)

        recipe.build_dir = os.path.join(tmp, 'toto')
        recipe.configure = 'test'
        configure = recipe._choose_configure(recipe.build_dir)
        self.assertEquals(configure, os.path.join(tmp, 'toto', 'test'))
        self.assertEquals(recipe.build_dir, os.path.join(tmp, 'toto'))
Exemplo n.º 3
0
 def testdownload(self):
     """testDownload."""
     p = tmp
     bd = Buildout(fp, [])
     bd.offline = False
     recipe = MinitageCommonRecipe(bd, '666', bd['part'])
     ret = recipe._download()
     self.assertTrue(
         os.path.isfile(os.path.join(recipe.download_cache,
                                     'buildouttest')))
     p = tmp
     bd = Buildout(fp, [])
     bd.offline = True
     open(os.path.join(p, 'a'), 'w').write('test')
     recipe = MinitageCommonRecipe(bd, '666', bd['part'])
     recipe.url = 'http://foo/a'
     recipe.download_cache = p
     ret = recipe._download()
     self.assertEquals(ret, os.path.join(p, 'a'))
Exemplo n.º 4
0
 def testdownload(self):
     """testDownload."""
     p = tmp
     bd = Buildout(fp, [])
     bd.offline = False
     recipe = MinitageCommonRecipe(bd, '666', bd['part'])
     ret = recipe._download()
     self.assertTrue(
         os.path.isfile(
             os.path.join(recipe.download_cache, 'buildouttest')
         )
     )
     p = tmp
     bd = Buildout(fp, [])
     bd.offline = True
     open(os.path.join(p, 'a'), 'w').write('test')
     recipe = MinitageCommonRecipe(bd, '666', bd['part'])
     recipe.url = 'http://foo/a'
     recipe.download_cache = p
     ret = recipe._download()
     self.assertEquals(
         ret,
         os.path.join(p, 'a')
     )
 def update(self, *args, **kw):
     self.options['install-in-place'] = 'true'
     bCmmi.update(self, *args, **kw)
     return self.options['location']
 def install(self, *args, **kw):
     bCmmi.install(self, *args, **kw)
     return self.options['location']