diff options
author | David Bradford <david.bradford@mongodb.com> | 2020-12-09 17:14:46 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-10 02:24:39 +0000 |
commit | fcea3bad022eda2faab38dd36863bfee04e9fde2 (patch) | |
tree | 629fda9b15841e4dcae0a93ac580e67e2499774e /buildscripts | |
parent | 3f247ef83d5ceb4d98766b003cece20dae4a768e (diff) | |
download | mongo-fcea3bad022eda2faab38dd36863bfee04e9fde2.tar.gz |
SERVER-53314: Fix distro specification if no large distro specified
(cherry picked from commit 105335191ba181f29f1812cbfbdee4bbc5685633)
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/evergreen_generate_resmoke_tasks.py | 7 | ||||
-rw-r--r-- | buildscripts/tests/test_evergreen_generate_resmoke_tasks.py | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/buildscripts/evergreen_generate_resmoke_tasks.py b/buildscripts/evergreen_generate_resmoke_tasks.py index df1e45a0aed..891f41aaa73 100755 --- a/buildscripts/evergreen_generate_resmoke_tasks.py +++ b/buildscripts/evergreen_generate_resmoke_tasks.py @@ -666,11 +666,12 @@ class EvergreenConfigGenerator(object): :return: List of distros to run on. """ if self.options.use_large_distro: - if (build_variant not in self.gen_config.build_variant_large_distro_exceptions - and not self.options.large_distro_name): + if self.options.large_distro_name: + return [self.options.large_distro_name] + + if build_variant not in self.gen_config.build_variant_large_distro_exceptions: print(NO_LARGE_DISTRO_ERR.format(build_variant=build_variant)) raise ValueError("Invalid Evergreen Configuration") - return [self.options.large_distro_name] return None def _generate_resmoke_args(self, suite_file: str) -> str: diff --git a/buildscripts/tests/test_evergreen_generate_resmoke_tasks.py b/buildscripts/tests/test_evergreen_generate_resmoke_tasks.py index d4c83ac76a2..b914b43d1a3 100644 --- a/buildscripts/tests/test_evergreen_generate_resmoke_tasks.py +++ b/buildscripts/tests/test_evergreen_generate_resmoke_tasks.py @@ -689,8 +689,7 @@ class EvergreenConfigGeneratorTest(unittest.TestCase): config = shrub_project.as_dict() self.assertEqual(len(config["tasks"]), len(suites) + 1) - self.assertEqual(options.large_distro_name, - config["buildvariants"][0]["tasks"][0]["distros"][0]) + self.assertIsNone(config["buildvariants"][0]["tasks"][0].get("distros")) def test_selecting_tasks(self): is_task_dependency = under_test.EvergreenConfigGenerator._is_task_dependency |