summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2014-04-23 12:08:55 -0400
committerAndrew Morrow <acm@mongodb.com>2014-07-12 16:50:51 -0400
commitef4f60e3951929a7b16cf8920216310ecc58cc49 (patch)
tree8e7c6419f6399fcf65a27e3536ce8b43f7702d05 /site_scons
parentf6a6dec8f14ef75980d1512bb6d5e30fab6b73db (diff)
downloadmongo-ef4f60e3951929a7b16cf8920216310ecc58cc49.tar.gz
SERVER-14343 leaner include paths
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/unittest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/site_scons/site_tools/unittest.py b/site_scons/site_tools/unittest.py
index 1615ba3f860..93ce02fefac 100644
--- a/site_scons/site_tools/unittest.py
+++ b/site_scons/site_tools/unittest.py
@@ -5,7 +5,7 @@ def exists(env):
return True
def register_unit_test(env, test):
- env._UnitTestList('$UNITTEST_LIST', test)
+ env['UNITTEST_LIST_ENV']._UnitTestList('$UNITTEST_LIST', test)
env.Alias('$UNITTEST_ALIAS', test)
def unit_test_list_builder_action(env, target, source):
@@ -37,6 +37,10 @@ def build_cpp_unit_test(env, target, source, **kwargs):
return result
def generate(env):
+ # Capture the top level env so we can use it to generate the unit test list file
+ # indepenently of which environment CppUnitTest was called in. Otherwise we will get "Two
+ # different env" warnings for the unit_test_list_builder_action.
+ env['UNITTEST_LIST_ENV'] = env;
unit_test_list_builder = env.Builder(
action=env.Action(unit_test_list_builder_action, "Generating $TARGET"),
multi=True)