summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/core/programs.py
diff options
context:
space:
mode:
authorjulianedwards <julian.edwards@mongodb.com>2020-10-21 11:44:22 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-12-14 18:27:30 +0000
commitfff7a4baa0583cb8e14c8d75649b0ac019600b11 (patch)
tree6c09282fdc3330633103f99d61f25eee13a156d0 /buildscripts/resmokelib/core/programs.py
parent22030f4bb1057b15ae0da46425b90775f1e2019b (diff)
downloadmongo-fff7a4baa0583cb8e14c8d75649b0ac019600b11.tar.gz
SERVER-49504: Allow resmoke's mongo shell to log to Jasper
Diffstat (limited to 'buildscripts/resmokelib/core/programs.py')
-rw-r--r--buildscripts/resmokelib/core/programs.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py
index 66f2c47faf6..2c8476eef1e 100644
--- a/buildscripts/resmokelib/core/programs.py
+++ b/buildscripts/resmokelib/core/programs.py
@@ -58,6 +58,10 @@ def make_process(*args, **kwargs):
process_cls = process.Process
if config.SPAWN_USING == "jasper":
process_cls = jasper_process.Process
+ else:
+ # remove jasper process specific args
+ kwargs.pop("job_num", None)
+ kwargs.pop("test_id", None)
# Add the current working directory and /data/multiversion to the PATH.
env_vars = kwargs.get("env_vars", {}).copy()
@@ -300,9 +304,9 @@ def mongos_program(logger, executable=None, process_kwargs=None, **kwargs):
return make_process(logger, args, **process_kwargs)
-def mongo_shell_program( # pylint: disable=too-many-branches,too-many-locals,too-many-statements
- logger, executable=None, connection_string=None, filename=None, process_kwargs=None,
- **kwargs):
+def mongo_shell_program( # pylint: disable=too-many-arguments,too-many-branches,too-many-locals,too-many-statements
+ logger, job_num=None, test_id=None, executable=None, connection_string=None, filename=None,
+ process_kwargs=None, **kwargs):
"""Return a Process instance that starts a mongo shell.
The shell is started with the given connection string and arguments constructed from 'kwargs'.
@@ -461,6 +465,8 @@ def mongo_shell_program( # pylint: disable=too-many-branches,too-many-locals,to
_set_keyfile_permissions(test_data)
process_kwargs = utils.default_if_none(process_kwargs, {})
+ process_kwargs["job_num"] = job_num
+ process_kwargs["test_id"] = test_id
return make_process(logger, args, **process_kwargs)