diff options
author | David Bradford <david.bradford@mongodb.com> | 2021-06-04 13:48:45 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-27 19:18:47 +0000 |
commit | 2dcea5045b0ddc807d361fc55a4a265c418ecd98 (patch) | |
tree | a58862f9e8b803d7c5c2db35f3184a6204d40337 /buildscripts/task_generation | |
parent | 9dec1bbeb530148389d0431c58a02a4471c6ecfe (diff) | |
download | mongo-2dcea5045b0ddc807d361fc55a4a265c418ecd98.tar.gz |
SERVER-57450: Filter misc tests based on tests in sub-suites
(cherry picked from commit 1c2b0f685aa3c035f43f4ecc924a42a50534f620)
Diffstat (limited to 'buildscripts/task_generation')
-rw-r--r-- | buildscripts/task_generation/evg_config_builder.py | 2 | ||||
-rw-r--r-- | buildscripts/task_generation/suite_split.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/buildscripts/task_generation/evg_config_builder.py b/buildscripts/task_generation/evg_config_builder.py index b0e83f3f245..09ba4dfab7d 100644 --- a/buildscripts/task_generation/evg_config_builder.py +++ b/buildscripts/task_generation/evg_config_builder.py @@ -65,7 +65,7 @@ class EvgConfigBuilder: :return: The suites files and evergreen configuration for the generated task. """ - test_list = self.resmoke_proxy.list_tests(generated_suite.suite_name) + test_list = generated_suite.get_test_list() return self.resmoke_proxy.render_suite_files( generated_suite.sub_suites, generated_suite.suite_name, generated_suite.filename, test_list, self.gen_options.create_misc_suite, generated_suite.build_variant) diff --git a/buildscripts/task_generation/suite_split.py b/buildscripts/task_generation/suite_split.py index a6c6976ba67..8f2e261247f 100644 --- a/buildscripts/task_generation/suite_split.py +++ b/buildscripts/task_generation/suite_split.py @@ -4,6 +4,7 @@ from __future__ import annotations import os from copy import deepcopy from datetime import datetime +from itertools import chain from typing import NamedTuple, Callable, Optional, List, Dict, Any import inject @@ -189,6 +190,10 @@ class GeneratedSuite(NamedTuple): return f"{base_name}_{self.build_variant}" return base_name + def get_test_list(self) -> List[str]: + """Get the list of tests that will be run by this suite.""" + return list(chain.from_iterable(sub_suite.test_list for sub_suite in self.sub_suites)) + def __len__(self) -> int: """Get the number of sub-suites.""" return len(self.sub_suites) |