summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--buildscripts/resmokelib/configure_resmoke.py20
-rw-r--r--buildscripts/resmokelib/core/process.py1
3 files changed, 23 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 9591ee1908f..4c35f527d92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -189,3 +189,6 @@ python2-venv
# Generated resmoke configuration file
resmoke.ini
+
+# UndoDB Recordings
+*.undo
diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py
index 36abd492f7a..1dec6779b73 100644
--- a/buildscripts/resmokelib/configure_resmoke.py
+++ b/buildscripts/resmokelib/configure_resmoke.py
@@ -4,6 +4,9 @@ import configparser
import datetime
import os
import os.path
+import distutils.spawn
+import sys
+import platform
import pymongo.uri_parser
@@ -56,6 +59,23 @@ def _validate_config(parser):
parser.error("Must specify binary versions as 'old' or 'new' in format"
" 'version1-version2'")
+ if _config.UNDO_RECORDER_PATH is not None:
+ if not sys.platform.startswith('linux') or platform.machine() not in [
+ "i386", "i686", "x86_64"
+ ]:
+ parser.error("--recordWith is only supported on x86 and x86_64 Linux distributions")
+ return
+
+ resolved_path = distutils.spawn.find_executable(_config.UNDO_RECORDER_PATH)
+ if resolved_path is None:
+ parser.error(
+ f"Cannot find the UndoDB live-record binary '{_config.UNDO_RECORDER_PATH}'. Check that it exists and is executable"
+ )
+ return
+
+ if not os.access(resolved_path, os.X_OK):
+ parser.error(f"Found '{resolved_path}', but it is not an executable file")
+
def _update_config_vars(values): # pylint: disable=too-many-statements,too-many-locals,too-many-branches
"""Update the variables of the config module."""
diff --git a/buildscripts/resmokelib/core/process.py b/buildscripts/resmokelib/core/process.py
index 9493ef8d1d4..0cadf16d703 100644
--- a/buildscripts/resmokelib/core/process.py
+++ b/buildscripts/resmokelib/core/process.py
@@ -120,7 +120,6 @@ class Process(object):
close_fds=close_fds, env=self.env, creationflags=creation_flags, cwd=self._cwd)
self.pid = self._process.pid
- # TODO: check path exists
if _config.UNDO_RECORDER_PATH is not None and ("mongod" in self.args[0]
or "mongos" in self.args[0]):
recorder_args = [