示例#1
0
    def __init__(self, options):
        """Initialize."""
        setup_logging(options.debug)
        cwd = os.getcwd()
        self.install_dir = os.path.join(cwd, options.install_dir)
        self.link_dir = os.path.join(cwd, options.link_dir)

        self.edition = options.edition.lower() if options.edition else None
        self.platform = options.platform.lower() if options.platform else None
        self.architecture = options.architecture.lower(
        ) if options.architecture else None
        self.use_latest = options.use_latest
        self.versions = options.versions

        self.download_binaries = options.download_binaries
        self.download_symbols = options.download_symbols
        self.download_artifacts = options.download_artifacts

        self.evg_api = evergreen_conn.get_evergreen_api(
            options.evergreen_config)
        # In evergreen github oauth token is stored as `token ******`, so we remove the leading part
        self.github_oauth_token = options.github_oauth_token.replace(
            "token ", "") if options.github_oauth_token else None
        with open(config.SETUP_MULTIVERSION_CONFIG) as file_handle:
            raw_yaml = yaml.safe_load(file_handle)
        self.config = config.SetupMultiversionConfig(raw_yaml)
示例#2
0
 def test_not_passing_evergreen_config(self):
     evergreen_config = None
     evg_api = evergreen_conn.get_evergreen_api(evergreen_config)
     self.assertIsInstance(evg_api, RetryingEvergreenApi)