0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00
mongodb/jstests/SConscript
Andrew Morrow 2f4e03bbca SERVER-43730 Small build system speed improvements
These should speed up all SCons startup tasks for both
vanilla SCons and Ninja generation
2019-10-14 22:46:31 +00:00

31 lines
719 B
Python

# Includes the jstests in distribution tarballs generated by SCons
import os
from collections import defaultdict
Import("env")
Import("get_option")
env = env.Clone()
if not get_option("install-mode") == "hygienic":
Return()
jstests = env.Glob("**/*.js")
# Group by directory to avoid making a million calls to AutoInstall
jstests_by_dir = defaultdict(list)
for jstest in jstests:
jstests_by_dir[jstest.dir].append(jstest)
for directory, files in jstests_by_dir.items():
env.AutoInstall(
target="$PREFIX_SHAREDIR/jstests/" + str(directory),
source=files,
AIB_COMPONENT="jstests",
AIB_ROLE="runtime",
AIB_COMPONENTS_EXTRA=[
"tests",
],
)