mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
2513cc511b
GitOrigin-RevId: 8923cc14f276be93355d763cb88c04bdb4dd9000
29 lines
656 B
Python
29 lines
656 B
Python
# Includes the jstests in distribution tarballs generated by SCons
|
|
|
|
from collections import defaultdict
|
|
|
|
Import("env")
|
|
Import("get_option")
|
|
|
|
Return()
|
|
|
|
env = env.Clone()
|
|
|
|
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",
|
|
],
|
|
)
|