diff options
author | David Bradford <david.bradford@mongodb.com> | 2021-11-05 17:48:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-05 21:21:49 +0000 |
commit | 507a5d6b964c31b4a5da16cfad78f98ae071664c (patch) | |
tree | 803a09979b9e13fd5d41f0da68df2643d57b3283 | |
parent | 60ce48d31de63b06dab060bd79533d5aa5b72375 (diff) | |
download | mongo-507a5d6b964c31b4a5da16cfad78f98ae071664c.tar.gz |
SERVER-60496: Better handle spaces in test_flags
There are two fixes in the commit:
* Use single quotes (') to interpret test_flags so that "\" are
interpreted correctly.
* burn_in_test does not need to include manually include build_variant
level test args. They will automatically be included when the test
runs since it is running on the build variant.
-rw-r--r-- | buildscripts/burn_in_tests.py | 2 | ||||
-rw-r--r-- | buildscripts/ciconfig/evergreen.py | 2 | ||||
-rw-r--r-- | buildscripts/tests/test_burn_in_tests.py | 8 | ||||
-rw-r--r-- | etc/evergreen.yml | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/buildscripts/burn_in_tests.py b/buildscripts/burn_in_tests.py index c67c4ca8b89..1e0e03fcb27 100644 --- a/buildscripts/burn_in_tests.py +++ b/buildscripts/burn_in_tests.py @@ -298,7 +298,7 @@ def _set_resmoke_args(task): resmoke_args. """ - resmoke_args = task.combined_resmoke_args + resmoke_args = task.resmoke_args suite_name = ResmokeArgs.get_arg(resmoke_args, "suites") if task.is_generate_resmoke_task: suite_name = task.get_vars_suite_name(task.generate_resmoke_tasks_command["vars"]) diff --git a/buildscripts/ciconfig/evergreen.py b/buildscripts/ciconfig/evergreen.py index 987e1b95a61..9100eadf6ef 100644 --- a/buildscripts/ciconfig/evergreen.py +++ b/buildscripts/ciconfig/evergreen.py @@ -333,7 +333,7 @@ class VariantTask(Task): @property def combined_resmoke_args(self): - """Get the combined resmoke arguments. + """Get the resmoke arguments. This results from the concatenation of the task's resmoke_args parameter and the variant's test_flags parameter. diff --git a/buildscripts/tests/test_burn_in_tests.py b/buildscripts/tests/test_burn_in_tests.py index 380ab520b1a..47fb34ad192 100644 --- a/buildscripts/tests/test_burn_in_tests.py +++ b/buildscripts/tests/test_burn_in_tests.py @@ -408,7 +408,7 @@ class TestSetResmokeArgs(unittest.TestCase): def test__set_resmoke_args(self): resmoke_args = "--suites=suite1 test1.js" task = Mock() - task.combined_resmoke_args = resmoke_args + task.resmoke_args = resmoke_args task.is_generate_resmoke_task = False self.assertEqual(resmoke_args, under_test._set_resmoke_args(task)) @@ -417,7 +417,7 @@ class TestSetResmokeArgs(unittest.TestCase): new_suite = "suite2" new_resmoke_args = "--suites={} test1.js".format(new_suite) task = Mock() - task.combined_resmoke_args = resmoke_args + task.resmoke_args = resmoke_args task.is_generate_resmoke_task = True task.get_vars_suite_name = lambda cmd_vars: cmd_vars["suite"] task.generate_resmoke_tasks_command = {"vars": {"suite": new_suite}} @@ -427,7 +427,7 @@ class TestSetResmokeArgs(unittest.TestCase): suite = "suite1" resmoke_args = "--suites={} test1.js".format(suite) task = Mock() - task.combined_resmoke_args = resmoke_args + task.resmoke_args = resmoke_args task.is_generate_resmoke_task = True task.get_vars_suite_name = lambda cmd_vars: cmd_vars["task"] task.generate_resmoke_tasks_command = {"vars": {"task": suite}} @@ -723,7 +723,7 @@ def create_variant_task_mock(task_name, suite_name, distro="distro"): variant_task.generated_task_name = task_name variant_task.resmoke_suite = suite_name variant_task.get_vars_suite_name.return_value = suite_name - variant_task.combined_resmoke_args = f"--suites={suite_name}" + variant_task.resmoke_args = f"--suites={suite_name}" variant_task.multiversion_path = None variant_task.run_on = [distro] return variant_task diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 9824bcc79b6..c3a5099fedb 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -1189,7 +1189,9 @@ functions: path_value="$path_value:${task_path_suffix}" fi - resmoke_cmd_args="${resmoke_args}" + # Assign the "resmoke_args" expansion to a variable with the value wrapped in single quotes + # to avoid any "/" characters getting interpreted incorrectly on windows. + resmoke_cmd_args='${resmoke_args}' # The "resmoke_wrapper" expansion is used by the 'burn_in_tests' task to wrap the resmoke.py # invocation. It doesn't set any environment variables and should therefore come last in |