コード例 #1
0
        self.options = options

        if options.verbose:
            enable_logging()

        if options.start_commit or options.end_commit:
            self.commit_range = CommitRange(options.start_commit,
                                            options.end_commit)

        LOGGER.debug("Starting execution for options %s", options)
        today = datetime.datetime.utcnow().replace(microsecond=0)
        start_date = today - datetime.timedelta(days=options.duration_days)
        target = ProjectTarget(options.owner, options.project, options.branch)

        for suite in options.suites:
            prepare_directory_for_suite(suite, CONFIG_DIRECTORY)

            data = self.get_data(target, start_date, suite, options.variants)
            suites = self.calculate_suites(data,
                                           options.execution_time_minutes * 60)

            LOGGER.debug("Creating %d suites for %s", len(suites), suite)

            render_suite(suites, suite, CONFIG_DIRECTORY)
            render_misc_suite(self.test_list, suite, CONFIG_DIRECTORY)


if __name__ == "__main__":
    Main(Dependencies(evergreen.get_evergreen_api(), GithubApi())).main()
コード例 #2
0
        options = self.parse_commandline()

        self.options = options

        if options.verbose:
            enable_logging()

        if options.start_commit or options.end_commit:
            self.commit_range = CommitRange(options.start_commit, options.end_commit)

        LOGGER.debug("Starting execution for options %s", options)
        task = options.task[0]

        today = datetime.datetime.utcnow().replace(microsecond=0)
        start_date = today - datetime.timedelta(days=options.duration_days)

        target = ProjectTarget(options.owner, options.project, options.branch)

        data = self.get_data(target, start_date, task, options.variants)
        suites = self.calculate_suites(data, options.execution_time_minutes * 60)

        LOGGER.debug("Creating %d suites", len(suites))

        self.render_suites(suites, task)
        self.render_misc_suite(task)


if __name__ == "__main__":
    Main(Dependencies(evergreen.get_evergreen_api(), GithubApi())).main()