diff options
author | Andrew Morrow <andrew.morrow@10gen.com> | 2019-10-14 22:46:31 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-14 22:46:31 +0000 |
commit | 2f4e03bbca3bf265eca475eb53a2f2dba3897ce2 (patch) | |
tree | 7732ba7e16681df4308ea34679550dda9603311b /jstests/SConscript | |
parent | 0dbb2c431bcec5f66cfefbebff655730d989a8d4 (diff) | |
download | mongo-2f4e03bbca3bf265eca475eb53a2f2dba3897ce2.tar.gz |
SERVER-43730 Small build system speed improvements
These should speed up all SCons startup tasks for both
vanilla SCons and Ninja generation
Diffstat (limited to 'jstests/SConscript')
-rw-r--r-- | jstests/SConscript | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/jstests/SConscript b/jstests/SConscript index c9aa97ef785..6c74052db81 100644 --- a/jstests/SConscript +++ b/jstests/SConscript @@ -1,5 +1,8 @@ # Includes the jstests in distribution tarballs generated by SCons +import os +from collections import defaultdict + Import("env") Import("get_option") @@ -8,10 +11,17 @@ env = env.Clone() if not get_option("install-mode") == "hygienic": Return() -for jstest in env.Glob("**/*.js"): +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(jstest.dir), - source=jstest, + target="$PREFIX_SHAREDIR/jstests/" + str(directory), + source=files, AIB_COMPONENT="jstests", AIB_ROLE="runtime", AIB_COMPONENTS_EXTRA=[ |