def test_twice_with_relpath(self): """runs rosinstall with generated self.simple_rosinstall to create local rosinstall env and creates a directory for a second local rosinstall env""" AbstractFakeRosBasedTest.setUp(self) self.rel_uri_rosinstall = os.path.join(self.test_root_path, "rel_uri.rosinstall") _create_yaml_file([ _create_config_elt_dict("git", "ros", self.ros_path), _create_config_elt_dict("git", "gitrepo", os.path.relpath(self.git_path)) ], self.rel_uri_rosinstall) config = rosinstall.multiproject_cmd.get_config( self.directory, [self.rel_uri_rosinstall, self.ros_path]) rosinstall.multiproject_cmd.cmd_install_or_update(config) config = rosinstall.multiproject_cmd.get_config( self.directory, [self.rel_uri_rosinstall, self.ros_path]) rosinstall.multiproject_cmd.cmd_install_or_update(config) self.rel_uri_rosinstall2 = os.path.join(self.test_root_path, "rel_uri.rosinstall2") # switch URIs to confuse config _create_yaml_file([ _create_config_elt_dict("git", "ros", os.path.relpath( self.git_path)), _create_config_elt_dict("git", "gitrepo", self.ros_path) ], self.rel_uri_rosinstall2) config = rosinstall.multiproject_cmd.get_config( self.directory, [self.rel_uri_rosinstall, self.ros_path]) rosinstall.multiproject_cmd.cmd_install_or_update(config)
def test_twice_with_relpath(self): """runs wstool with generated self.simple_rosinstall to create local wstool env and creates a directory for a second local wstool env""" AbstractFakeRosBasedTest.setUp(self) self.rel_uri_rosinstall = os.path.join(self.test_root_path, "rel_uri.rosinstall") _create_yaml_file([_create_config_elt_dict("git", "ros", self.ros_path), _create_config_elt_dict("git", "gitrepo", os.path.relpath(self.git_path))], self.rel_uri_rosinstall) config = wstool.multiproject_cmd.get_config(self.directory, [self.rel_uri_rosinstall, self.ros_path]) wstool.multiproject_cmd.cmd_info(config) wstool.multiproject_cmd.cmd_find_unmanaged_repos wstool.multiproject_cmd.cmd_install_or_update(config) config = wstool.multiproject_cmd.get_config(self.directory, [self.rel_uri_rosinstall, self.ros_path]) wstool.multiproject_cmd.cmd_install_or_update(config) self.rel_uri_rosinstall2 = os.path.join(self.test_root_path, "rel_uri.wstool2") # switch URIs to confuse config _create_yaml_file([_create_config_elt_dict("git", "ros", os.path.relpath(self.git_path)), _create_config_elt_dict("git", "gitrepo", self.ros_path)], self.rel_uri_rosinstall2) config = wstool.multiproject_cmd.get_config(self.directory, [self.rel_uri_rosinstall, self.ros_path]) wstool.multiproject_cmd.cmd_install_or_update(config)
def setUpClass(self): AbstractFakeRosBasedTest.setUpClass() # create another repo in git self.git_path2 = os.path.join(self.test_root_path, "gitrepo2") _create_git_repo(self.git_path2) self.simple_changed_uri_rosinstall = os.path.join(self.test_root_path, "simple_changed_uri.rosinstall") # same local name for gitrepo, different uri _create_yaml_file( [ _create_config_elt_dict("git", "ros", self.ros_path), _create_config_elt_dict("git", "gitrepo", self.git_path2), ], self.simple_changed_uri_rosinstall, ) # create a broken config self.broken_rosinstall = os.path.join(self.test_root_path, "broken.rosinstall") _create_yaml_file( [ _create_config_elt_dict("other", self.ros_path), _create_config_elt_dict("hg", "hgrepo", self.hg_path + "invalid"), ], self.broken_rosinstall, )
def setUp(self): """runs rosinstall with generated self.simple_rosinstall to create local rosinstall env and creates a directory for a second local rosinstall env""" AbstractFakeRosBasedTest.setUp(self) # setup a rosinstall env as base for further tests cmd = copy.copy(self.rosinstall_fn) cmd.extend([self.directory, self.simple_rosinstall]) self.assertTrue(rosinstall_main(cmd)) self.new_directory = tempfile.mkdtemp() self.directories["new_ros_env"] = self.new_directory
def setUpClass(self): AbstractFakeRosBasedTest.setUpClass() # create another repo in git self.tar_path = os.path.join(self.test_root_path, "tarfile.tar.bz2") _create_tar_file(self.tar_path) self.simple_tar_rosinstall = os.path.join(self.test_root_path, "simple_changed_uri.rosinstall") # same local name for gitrepo, different uri _create_yaml_file([_create_config_elt_dict("tar", "temptar", uri=self.tar_path, version='temptar')], self.simple_tar_rosinstall)
def setUp(self): """runs rosinstall with generated self.simple_rosinstall to create local rosinstall env and creates a second directory self.new_directory for a second local rosinstall env""" AbstractFakeRosBasedTest.setUp(self) self.simple_fuerte_rosinstall = os.path.join(self.test_root_path, "simple_fuerte.rosinstall") _create_yaml_file([_create_config_elt_dict("git", "ros", self.ros_path), _create_config_elt_dict("setup-file", "setup.sh"), _create_config_elt_dict("hg", "hgrepo", self.hg_path)], self.simple_fuerte_rosinstall) # setup a rosinstall env as base for further tests cmd = copy.copy(self.rosinstall_fn) cmd.extend([self.directory, self.simple_fuerte_rosinstall]) self.assertTrue(rosinstall_main(cmd)) self.new_directory = tempfile.mkdtemp() self.directories["new_ros_env"] = self.new_directory
def setUpClass(self): AbstractFakeRosBasedTest.setUpClass() # create another repo in git self.git_path2 = os.path.join(self.test_root_path, "gitrepo2") _create_git_repo(self.git_path2) self.simple_changed_uri_rosinstall = os.path.join( self.test_root_path, "simple_changed_uri.rosinstall") # same local name for gitrepo, different uri _create_yaml_file([ _create_config_elt_dict("git", "ros", self.ros_path), _create_config_elt_dict("git", "gitrepo", self.git_path2) ], self.simple_changed_uri_rosinstall) # create a broken config self.broken_rosinstall = os.path.join(self.test_root_path, "broken.rosinstall") _create_yaml_file([ _create_config_elt_dict("other", self.ros_path), _create_config_elt_dict("hg", "hgrepo", self.hg_path + "invalid") ], self.broken_rosinstall)
def setUp(self): """runs rosinstall with generated self.simple_rosinstall to create local rosinstall env and creates a directory for a second local rosinstall env""" AbstractFakeRosBasedTest.setUp(self)