mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-42759 Allow resmoke to search for executables on the PATH by default
This commit is contained in:
parent
e9eae61c27
commit
920169417e
@ -21,12 +21,13 @@ MONGO_RUNNER_SUBDIR = "mongorunner"
|
||||
# The latter is set automatically as part of resmoke's option parsing on startup.
|
||||
##
|
||||
|
||||
# Default path for where to look for executables.
|
||||
# We default to search for executables in the current working directory or in /data/multiversion
|
||||
# which are both part of the PATH.
|
||||
DEFAULT_DBTEST_EXECUTABLE = os.path.join(os.curdir, "dbtest")
|
||||
DEFAULT_MONGO_EXECUTABLE = os.path.join(os.curdir, "mongo")
|
||||
DEFAULT_MONGOEBENCH_EXECUTABLE = os.path.join(os.curdir, "mongoebench")
|
||||
DEFAULT_MONGOD_EXECUTABLE = os.path.join(os.curdir, "mongod")
|
||||
DEFAULT_MONGOS_EXECUTABLE = os.path.join(os.curdir, "mongos")
|
||||
DEFAULT_MONGOEBENCH_EXECUTABLE = "mongoebench"
|
||||
DEFAULT_MONGO_EXECUTABLE = "mongo"
|
||||
DEFAULT_MONGOD_EXECUTABLE = "mongod"
|
||||
DEFAULT_MONGOS_EXECUTABLE = "mongos"
|
||||
|
||||
DEFAULT_BENCHMARK_REPETITIONS = 3
|
||||
DEFAULT_BENCHMARK_MIN_TIME = datetime.timedelta(seconds=5)
|
||||
@ -35,6 +36,10 @@ DEFAULT_BENCHMARK_MIN_TIME = datetime.timedelta(seconds=5)
|
||||
# starts, as well as those started by individual tests.
|
||||
DEFAULT_DBPATH_PREFIX = os.path.normpath("/data/db")
|
||||
|
||||
# Default directory that we expect to contain binaries for multiversion testing. This directory is
|
||||
# added to the PATH when calling programs.make_process().
|
||||
DEFAULT_MULTIVERSION_DIR = os.path.normpath("/data/multiversion")
|
||||
|
||||
# Default location for the genny executable. Override this in the YAML suite configuration if
|
||||
# desired.
|
||||
DEFAULT_GENNY_EXECUTABLE = os.path.normpath("genny/build/src/driver/genny")
|
||||
|
@ -44,6 +44,13 @@ def make_process(*args, **kwargs):
|
||||
process_cls = process.Process
|
||||
if config.SPAWN_USING == "jasper":
|
||||
process_cls = jasper_process.Process
|
||||
# Add the current working directory and /data/multiversion to the PATH.
|
||||
process_kwargs = kwargs.get("process_kwargs", {}).copy()
|
||||
env_vars = process_kwargs.get("env_vars", {}).copy()
|
||||
path = [env_vars.get("PATH", os.environ.get("PATH", ""))]
|
||||
path.extend([os.getcwd(), config.DEFAULT_MULTIVERSION_DIR])
|
||||
env_vars["PATH"] = os.pathsep.join(path)
|
||||
kwargs["env_vars"] = env_vars
|
||||
return process_cls(*args, **kwargs)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user