summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2022-05-12 20:42:32 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-12 22:39:36 +0000
commitf73173d32e103c158c21e5b997ea7b413b2b3633 (patch)
treeeda0530bfa338fd7504993cecc321ce5f40cc3c2 /SConstruct
parentdf995d36642a75186dfc01198bc0d6f2d1030ce2 (diff)
downloadmongo-f73173d32e103c158c21e5b997ea7b413b2b3633.tar.gz
SERVER-65544 updated build to create a tmpdir for tests to run in.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct12
1 files changed, 12 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index afdaffa166e..38884c00102 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1080,6 +1080,13 @@ env_vars.Add('WINDOWS_OPENSSL_BIN',
help='Sets the path to the openssl binaries for packaging',
default='c:/openssl/bin')
+# TODO SERVER-42170 switch to PathIsDirCreate validator
+env_vars.Add(PathVariable(
+ "LOCAL_TMPDIR",
+ help='Set the TMPDIR when running tests.',
+ default='$BUILD_ROOT/tmp_test_data',
+ validator=PathVariable.PathAccept
+))
# -- Validate user provided options --
# A dummy environment that should *only* have the variables we have set. In practice it has
@@ -1217,6 +1224,11 @@ if get_option('build-tools') == 'next':
env = Environment(variables=env_vars, **envDict)
del envDict
+# TODO SERVER-42170 We can remove this Execute call
+# when support for PathIsDirCreate can be used as a validator
+# to the Variable above.
+env.Execute(SCons.Defaults.Mkdir(env.Dir('$LOCAL_TMPDIR')))
+
if get_option('cache-signature-mode') == 'validate':
validate_cache_dir = Tool('validate_cache_dir')
if validate_cache_dir.exists(env):