예제 #1
0
	def test_find_root(self):
		"""Check that Katipo can find a katipo root after it is created."""
		katipo.KatipoRoot(folder=os.path.join(self.tempfolder, 'workingcopy'))
		# Check that you can find it inside a folder
		os.mkdir(os.path.join(self.tempfolder, 'workingcopy', 'test', 'foo'))
		katipo.KatipoRoot(folder=os.path.join(self.tempfolder, 'workingcopy',
											'test', 'foo'))
예제 #2
0
파일: cmdline.py 프로젝트: jjh42/katipo
 def exec_cmd(self, args, working_dir):
     external_cmd = args.external_cmd
     if len(external_cmd) == 0:
         external_cmd = ['./test']
     logging.info('Executing command %s' % str(external_cmd))
     k = katipo.KatipoRoot(folder=working_dir)
     k.run_cmd_per_repo(external_cmd, test_only=True)
예제 #3
0
	def test_clone(self):
		k = katipo.KatipoRoot(folder=os.path.join(self.tempfolder, 'workingcopy'),
				giturl=os.path.join(self.tempfolder, 'gitrepos/assemblies'),
				assemblyfile='testassembly.katipo')
		# Check that the two repos in the assembly were created properly
		os.stat(os.path.join(self.tempfolder, 'workingcopy', 'test', 'test'))
		os.stat(os.path.join(self.tempfolder, 'workingcopy', 'notest', 'notest'))
예제 #4
0
	def test_overclone(self):
		"""Check that trying to clone on top of an existing katipo setup throws an
		Exception."""
		k = katipo.KatipoRoot(folder=os.path.join(self.tempfolder, 'workingcopy'),
				giturl=os.path.join(self.tempfolder, 'gitrepos/assemblies'),
				assemblyfile='testassembly.katipo')

		def _run():
			katipo.KatipoRoot(folder=os.path.join(self.tempfolder, 'workingcopy'),
				giturl=os.path.join(self.tempfolder, 'gitrepos/assemblies'),
				assemblyfile='testassembly.katipo')
		self.assertRaises(Exception, _run)
예제 #5
0
파일: cmdline.py 프로젝트: jjh42/katipo
    def exec_cmd(self, args, working_dir):
        clone_location = args.clonelocation
        if clone_location is None:
            # Default to cloning in the basename of assembly file
            clone_location = os.path.splitext(args.assemblyfile)[0]

        if os.path.isabs(clone_location):
            working_dir = clone_location
        else:
            working_dir = os.path.join(working_dir, clone_location)
        logging.info('Cloning into working_dir %s' % working_dir)
        katipo.KatipoRoot(folder=working_dir,
                          giturl=args.assemblyrepo,
                          assemblyfile=args.assemblyfile)
예제 #6
0
		def _run():
			katipo.KatipoRoot(folder=os.path.join(self.tempfolder, 'workingcopy'),
				giturl=os.path.join(self.tempfolder, 'gitrepos/assemblies'),
				assemblyfile='testassembly.katipo')
예제 #7
0
파일: cmdline.py 프로젝트: jjh42/katipo
 def exec_cmd(self, args, working_dir):
     logging.info('Executing command', args.external_cmd)
     k = katipo.KatipoRoot(folder=working_dir)
     k.run_cmd_per_repo(args.external_cmd)
예제 #8
0
파일: cmdline.py 프로젝트: jjh42/katipo
 def exec_cmd(self, args, working_dir):
     k = katipo.KatipoRoot(folder=working_dir)
     k.setup_virtualenv(python_exe=args.python)
예제 #9
0
파일: cmdline.py 프로젝트: jjh42/katipo
 def exec_cmd(self, args, working_dir):
     k = katipo.KatipoRoot(folder=working_dir)
     k.checkout(args.branch, tracking=args.tracking)
예제 #10
0
 def checkout_working_copy(self):
     self.k = katipo.KatipoRoot(folder=os.path.join(self.tempfolder,
                                                    'workingcopy'),
                                giturl=os.path.join(self.tempfolder,
                                                    'gitrepos/assemblies'),
                                assemblyfile='testassembly.katipo')