summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2018-03-22 03:32:55 -0400
committerAndrew Morrow <acm@mongodb.com>2018-03-23 15:14:36 -0400
commit82b6d9b43196760a0efbe3b06c3b5d521900d304 (patch)
tree52d5e6993fdd251632ba61c9285e5c252cbb55f3 /site_scons
parent962eb29eac3b8122871a14190d43799a7963d948 (diff)
downloadmongo-82b6d9b43196760a0efbe3b06c3b5d521900d304.tar.gz
SERVER-34071 Apply install aliases to other binaries when in hygienic mode
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/auto_install_binaries.py8
-rw-r--r--site_scons/site_tools/mongo_benchmark.py5
-rw-r--r--site_scons/site_tools/mongo_integrationtest.py1
-rw-r--r--site_scons/site_tools/mongo_unittest.py5
4 files changed, 13 insertions, 6 deletions
diff --git a/site_scons/site_tools/auto_install_binaries.py b/site_scons/site_tools/auto_install_binaries.py
index b2459e662f7..28e8aeb1c41 100644
--- a/site_scons/site_tools/auto_install_binaries.py
+++ b/site_scons/site_tools/auto_install_binaries.py
@@ -13,7 +13,7 @@ def generate(env):
'.so' : 'lib',
}
- def tag_install(env, target, source, **kwargs):
+ def auto_install(env, target, source, **kwargs):
prefixDir = env.Dir('$INSTALL_DIR')
actions = []
@@ -28,11 +28,11 @@ def generate(env):
tags = kwargs.get('INSTALL_ALIAS', [])
if tags:
- env.Alias(tags, actions)
+ env.Alias(['install-' + tag for tag in tags], actions)
return actions
- env.AddMethod(tag_install, 'Install')
+ env.AddMethod(auto_install, 'AutoInstall')
def auto_install_emitter(target, source, env):
for t in target:
@@ -46,7 +46,7 @@ def generate(env):
if auto_install_location:
tentry_install_tags = env.get('INSTALL_ALIAS', [])
setattr(tentry.attributes, 'INSTALL_ALIAS', tentry_install_tags)
- install = env.Install(auto_install_location, tentry, INSTALL_ALIAS=tentry_install_tags)
+ install = env.AutoInstall(auto_install_location, tentry, INSTALL_ALIAS=tentry_install_tags)
return (target, source)
def add_emitter(builder):
diff --git a/site_scons/site_tools/mongo_benchmark.py b/site_scons/site_tools/mongo_benchmark.py
index 7c12627bc42..b2a1750e3d2 100644
--- a/site_scons/site_tools/mongo_benchmark.py
+++ b/site_scons/site_tools/mongo_benchmark.py
@@ -31,10 +31,13 @@ def build_benchmark(env, target, source, **kwargs):
libdeps.append('$BUILD_DIR/mongo/unittest/benchmark_main')
kwargs['LIBDEPS'] = libdeps
+ kwargs['INSTALL_ALIAS'] = ['benchmarks']
result = bmEnv.Program(target, source, **kwargs)
bmEnv.RegisterBenchmark(result[0])
- bmEnv.Install("#/build/benchmark/", result[0])
+ hygienic = bmEnv.GetOption('install-mode') == 'hygienic'
+ if not hygienic:
+ bmEnv.Install("#/build/benchmark/", result[0])
return result
def generate(env):
diff --git a/site_scons/site_tools/mongo_integrationtest.py b/site_scons/site_tools/mongo_integrationtest.py
index ff9a5f451b3..0ced90c9493 100644
--- a/site_scons/site_tools/mongo_integrationtest.py
+++ b/site_scons/site_tools/mongo_integrationtest.py
@@ -25,6 +25,7 @@ def build_cpp_integration_test(env, target, source, **kwargs):
libdeps.append( '$BUILD_DIR/mongo/unittest/integration_test_main' )
kwargs['LIBDEPS'] = libdeps
+ kwargs['INSTALL_ALIAS'] = ['tests']
result = env.Program(target, source, **kwargs)
env.RegisterIntegrationTest(result[0])
diff --git a/site_scons/site_tools/mongo_unittest.py b/site_scons/site_tools/mongo_unittest.py
index ec99ab2d45b..2ad0f51bfd0 100644
--- a/site_scons/site_tools/mongo_unittest.py
+++ b/site_scons/site_tools/mongo_unittest.py
@@ -24,10 +24,13 @@ def build_cpp_unit_test(env, target, source, **kwargs):
libdeps.append( '$BUILD_DIR/mongo/unittest/unittest_main' )
kwargs['LIBDEPS'] = libdeps
+ kwargs['INSTALL_ALIAS'] = ['tests']
result = env.Program(target, source, **kwargs)
env.RegisterUnitTest(result[0])
- env.Install("#/build/unittests/", result[0])
+ hygienic = env.GetOption('install-mode') == 'hygienic'
+ if not hygienic:
+ env.Install("#/build/unittests/", result[0])
return result
def generate(env):