コード例 #1
0
ファイル: burn_in_tests.py プロジェクト: nferreira/mongo
def create_task_list_for_tests(changed_tests: Set[str],
                               build_variant: str,
                               evg_conf: EvergreenProjectConfig,
                               exclude_suites: Optional[List] = None,
                               exclude_tasks: Optional[List] = None) -> Dict:
    """
    Create a list of tests by task for the given tests.

    :param changed_tests: Set of test that have changed.
    :param build_variant: Build variant to collect tasks from.
    :param evg_conf: Evergreen configuration.
    :param exclude_suites: Suites to exclude.
    :param exclude_tasks: Tasks to exclude.
    :return: Tests by task.
    """
    if not exclude_suites:
        exclude_suites = []
    if not exclude_tasks:
        exclude_tasks = []

    suites = get_suites(suite_files=SUITE_FILES, test_files=changed_tests)
    LOGGER.debug("Found suites to run", suites=suites)

    tests_by_executor = create_executor_list(suites, exclude_suites)
    LOGGER.debug("tests_by_executor", tests_by_executor=tests_by_executor)

    return create_task_list(evg_conf, build_variant, tests_by_executor,
                            exclude_tasks)
コード例 #2
0
 def _get_suites(self):
     """Return the list of suites for this resmoke invocation."""
     try:
         return suitesconfig.get_suites(self._config.suite_files, self._config.test_files)
     except errors.SuiteNotFound as err:
         self._resmoke_logger.error("Failed to parse YAML suite definition: %s", str(err))
         self.list_suites()
         self.exit(1)
コード例 #3
0
ファイル: resmoke.py プロジェクト: acmorrow/mongo
 def _get_suites(self):
     """Return the list of suites for this resmoke invocation."""
     try:
         return suitesconfig.get_suites(self._config.suite_files, self._config.test_files)
     except errors.SuiteNotFound as err:
         self._resmoke_logger.error("Failed to parse YAML suite definition: %s", str(err))
         self.list_suites()
         self.exit(1)