diff options
author | Lydia Stepanek <lydia.stepanek@mongodb.com> | 2020-02-28 13:48:37 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-05 16:58:44 +0000 |
commit | 2a76e589a5eae90f743e4ec809ce8a8a9eb9ec2f (patch) | |
tree | 8c5a2001ff2759ec2938fd79a5e740d4f460a93e /buildscripts/burn_in_tests.py | |
parent | fceaea11f2b558135a28fb3ef66d87a3d1389a26 (diff) | |
download | mongo-2a76e589a5eae90f743e4ec809ce8a8a9eb9ec2f.tar.gz |
SERVER-46453 Selected_tests_gen should pick up changed files in mongo-enterprise-modules files
(cherry picked from commit 92f4273fb6d3d3079b07dc3c76acf1afd17f4225)
Diffstat (limited to 'buildscripts/burn_in_tests.py')
-rw-r--r-- | buildscripts/burn_in_tests.py | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/buildscripts/burn_in_tests.py b/buildscripts/burn_in_tests.py index 62b9c13c6c5..7059d10f07f 100644 --- a/buildscripts/burn_in_tests.py +++ b/buildscripts/burn_in_tests.py @@ -32,7 +32,7 @@ if __name__ == "__main__" and __package__ is None: # pylint: disable=wrong-import-position import buildscripts.evergreen_gen_multiversion_tests as gen_multiversion import buildscripts.evergreen_generate_resmoke_tasks as gen_resmoke -from buildscripts.patch_builds.change_data import find_changed_files +from buildscripts.patch_builds.change_data import find_changed_files_in_repos import buildscripts.resmokelib.parser from buildscripts.resmokelib.suitesconfig import create_test_membership_map, get_suites, \ get_named_suites_with_root_level_key @@ -239,22 +239,14 @@ def find_changed_tests(repos: Iterable[Repo]) -> Set[str]: """ Find the changed tests. - Use git to find which files have changed in this patch. + Use git to find which test files have changed in this patch. The returned file paths are in normalized form (see os.path.normpath(path)). + :param repos: List of repos containing changed files. :returns: Set of changed tests. """ - all_changed_tests = set() - for repo in repos: - changed_files = find_changed_files(repo) - LOGGER.debug("Found changed files", files=changed_files) - changed_tests = { - os.path.normpath(path) - for path in changed_files if is_file_a_test_file(path) - } - LOGGER.debug("Found changed tests", files=changed_tests) - all_changed_tests.update(changed_tests) - return all_changed_tests + changed_files = find_changed_files_in_repos(repos) + return {os.path.normpath(path) for path in changed_files if is_file_a_test_file(path)} def find_excludes(selector_file: str) -> Tuple[List, List, List]: @@ -721,6 +713,7 @@ def create_tests_by_task(build_variant: str, repos: Iterable[Repo], :return: Tests by task. """ changed_tests = find_changed_tests(repos) + LOGGER.debug("Found changed tests", files=changed_tests) exclude_suites, exclude_tasks, exclude_tests = find_excludes(SELECTOR_FILE) changed_tests = filter_tests(changed_tests, exclude_tests) |