summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2021-04-09 20:54:20 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-09 21:40:27 +0000
commitc84b72d4eb5d4016a6c0223ca0e86c39f567ba5b (patch)
treed37d808a382157dddd92cb5669283ca53a449198 /SConstruct
parentaab15521427af6233739f5fa65df52ac9d9e95f0 (diff)
downloadmongo-c84b72d4eb5d4016a6c0223ca0e86c39f567ba5b.tar.gz
SERVER-54732 Added validate cachedir tool
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct13
1 files changed, 13 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 9e4cad24503..638d28ceb73 100644
--- a/SConstruct
+++ b/SConstruct
@@ -469,6 +469,12 @@ add_option('cache-dir',
help='Specify the directory to use for caching objects if --cache is in use',
)
+add_option('cache-signature-mode',
+ choices=['none', 'validate'],
+ default="none",
+ help='Extra check to validate integrity of cache files after pulling from cache',
+)
+
add_option("cxx-std",
choices=["17"],
default="17",
@@ -1202,6 +1208,13 @@ if get_option('build-tools') == 'next':
env = Environment(variables=env_vars, **envDict)
del envDict
+if get_option('cache-signature-mode') == 'validate':
+ validate_cache_dir = Tool('validate_cache_dir')
+ if validate_cache_dir.exists(env):
+ validate_cache_dir(env)
+ else:
+ env.FatalError("Failed to enable validate_cache_dir tool.")
+
# Only print the spinner if stdout is a tty
if sys.stdout.isatty():
Progress(['-\r', '\\\r', '|\r', '/\r'], interval=50)