def setUpClass(self): AbstractSCMTest.setUpClass() self.remote_path = os.path.join(self.test_root_path, 'remote') self.new_remote_path = os.path.join(self.test_root_path, 'fooo') self.version = 'master' self.branch = 'test_branch' self.date = datetime.date.today().isoformat() os.makedirs(self.remote_path) create_git_repo(self.remote_path) # wstool the remote repo and fake ros entry = '''\ - other: {local-name: ../ros} - git: {local-name: clone, uri: ../remote, version: %s} ''' % self.version _add_to_file(os.path.join(self.local_path, '.rosinstall'), entry) cmd = ['wstool', 'update', '-t', 'ws'] os.chdir(self.test_root_path) wstool_main(cmd) self.clone_path = os.path.join(self.local_path, 'clone') modify_git_repo(self.clone_path) subprocess.check_call(['git', 'checkout', '-b', self.branch], cwd=self.clone_path) subprocess.check_call(['git', 'remote', 'set-url', 'origin', self.new_remote_path], cwd=self.clone_path)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path = os.path.join(self.test_root_path, "remote") os.makedirs(remote_path) create_git_repo(remote_path) self.rosinstall_filename = os.path.join(self.local_path, "shallow-test.rosinstall") _add_to_file( self.rosinstall_filename, "- git: {local-name: clone, uri: \"file://" + remote_path + "\"}") cmd = [ "wstool", "init", "ws-without-shallow", self.rosinstall_filename ] os.chdir(self.test_root_path) wstool_main(cmd) cmd = [ "wstool", "init", "--shallow", "ws-with-shallow", self.rosinstall_filename ] os.chdir(self.test_root_path) wstool_main(cmd)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path = os.path.join(self.test_root_path, "remote") os.makedirs(remote_path) create_hg_repo(remote_path) # rosinstall the remote repo and fake ros _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- hg: {local-name: clone, uri: ../remote}") cmd = ["rosinstall", "ws", "-n"] os.chdir(self.test_root_path) rosinstall_main(cmd) clone_path = os.path.join(self.local_path, "clone") modify_hg_repo(clone_path)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path_svn = os.path.join(self.test_root_path, "remote_svn") remote_path_git = os.path.join(self.test_root_path, "remote_git") remote_path_bzr = os.path.join(self.test_root_path, "remote_bzr") remote_path_hg = os.path.join(self.test_root_path, "remote_hg") os.makedirs(remote_path_git) os.makedirs(remote_path_svn) os.makedirs(remote_path_hg) os.makedirs(remote_path_bzr) filler_path = os.path.join(self.test_root_path, "filler") svn_uri = "file://localhost" + remote_path_svn create_svn_repo(self.test_root_path, remote_path_svn, filler_path, svn_uri) create_git_repo(remote_path_git) create_hg_repo(remote_path_hg) create_bzr_repo(remote_path_bzr) # rosinstall the remote repo and fake ros (using git twice to check all overlaps) rosinstall_spec = """- other: {local-name: ../ros} - git: {local-name: clone_git, uri: ../remote_git} - svn: {local-name: clone_svn, uri: '%s'} - hg: {local-name: clone_hg, uri: ../remote_hg} - bzr: {local-name: clone_bzr, uri: ../remote_bzr} - git: {local-name: clone_git2, uri: ../remote_git}""" % svn_uri _add_to_file(os.path.join(self.local_path, ".rosinstall"), rosinstall_spec) cmd = ["rosinstall", "ws", "-n"] os.chdir(self.test_root_path) rosinstall_main(cmd) clone_path_git = os.path.join(self.local_path, "clone_git") clone_path_git2 = os.path.join(self.local_path, "clone_git2") clone_path_svn = os.path.join(self.local_path, "clone_svn") clone_path_hg = os.path.join(self.local_path, "clone_hg") clone_path_bzr = os.path.join(self.local_path, "clone_bzr") modify_git_repo(clone_path_git2) modify_git_repo(clone_path_git) modify_svn_repo(clone_path_svn) modify_hg_repo(clone_path_hg) modify_bzr_repo(clone_path_bzr)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path = os.path.join(self.test_root_path, "remote") os.makedirs(remote_path) create_bzr_repo(remote_path) # wstool the remote repo and fake ros _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- bzr: {local-name: clone, uri: %s}" % remote_path) cmd = ["wstool", "update", "-t", "ws"] os.chdir(self.test_root_path) wstool_main(cmd) clone_path = os.path.join(self.local_path, "clone") modify_bzr_repo(clone_path)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path = os.path.join(self.test_root_path, "remote") os.makedirs(remote_path) create_git_repo(remote_path) self.rosinstall_filename = os.path.join(self.local_path, "shallow-test.rosinstall") _add_to_file(self.rosinstall_filename, "- git: {local-name: clone, uri: \"file://" + remote_path + "\"}") cmd = ["wstool", "init", "ws-without-shallow", self.rosinstall_filename] os.chdir(self.test_root_path) wstool_main(cmd) cmd = ["wstool", "init", "--shallow", "ws-with-shallow", self.rosinstall_filename] os.chdir(self.test_root_path) wstool_main(cmd)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path = os.path.join(self.test_root_path, "remote") filler_path = os.path.join(self.test_root_path, "filler") svn_uri = "file://localhost" + remote_path create_svn_repo(self.test_root_path, remote_path, filler_path, svn_uri) # wstool the remote repo and fake ros _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- svn: {local-name: clone, uri: '" + svn_uri + "'}") cmd = ["wstool", "update", "-t", "ws"] os.chdir(self.test_root_path) wstool_main(cmd) clone_path = os.path.join(self.local_path, "clone") modify_svn_repo(clone_path)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path_svn = os.path.join(self.test_root_path, "remote_svn") remote_path_git = os.path.join(self.test_root_path, "remote_git") remote_path_bzr = os.path.join(self.test_root_path, "remote_bzr") remote_path_hg = os.path.join(self.test_root_path, "remote_hg") os.makedirs(remote_path_git) os.makedirs(remote_path_svn) os.makedirs(remote_path_hg) os.makedirs(remote_path_bzr) filler_path = os.path.join(self.test_root_path, "filler") svn_uri = "file://localhost"+remote_path_svn create_svn_repo(self.test_root_path, remote_path_svn, filler_path, svn_uri) create_git_repo(remote_path_git) create_hg_repo(remote_path_hg) create_bzr_repo(remote_path_bzr) # rosinstall the remote repo and fake ros (using git twice to check all overlaps) rosinstall_spec = """- other: {local-name: ../ros} - git: {local-name: clone_git, uri: ../remote_git} - svn: {local-name: clone_svn, uri: '%s'} - hg: {local-name: clone_hg, uri: ../remote_hg} - bzr: {local-name: clone_bzr, uri: ../remote_bzr} - git: {local-name: clone_git2, uri: ../remote_git}""" % svn_uri _add_to_file(os.path.join(self.local_path, ".rosinstall"), rosinstall_spec) cmd = ["rosinstall", "ws", "-n"] os.chdir(self.test_root_path) rosinstall_main(cmd) clone_path_git = os.path.join(self.local_path, "clone_git") clone_path_git2 = os.path.join(self.local_path, "clone_git2") clone_path_svn = os.path.join(self.local_path, "clone_svn") clone_path_hg = os.path.join(self.local_path, "clone_hg") clone_path_bzr = os.path.join(self.local_path, "clone_bzr") modify_git_repo(clone_path_git2) modify_git_repo(clone_path_git) modify_svn_repo(clone_path_svn) modify_hg_repo(clone_path_hg) modify_bzr_repo(clone_path_bzr)
def setUpClass(self): AbstractSCMTest.setUpClass() remote_path = os.path.join(self.test_root_path, "remote") os.makedirs(remote_path) create_git_repo(remote_path) # rosinstall the remote repo and fake ros _add_to_file( os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- git: {local-name: clone, uri: ../remote}" ) cmd = ["rosinstall", "ws", "-n"] os.chdir(self.test_root_path) rosinstall_main(cmd) clone_path = os.path.join(self.local_path, "clone") modify_git_repo(clone_path)