diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-06-13 14:34:36 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-06-13 15:24:31 -0400 |
commit | be32f9f467972ffd2e9f37e244c09f88d354faf0 (patch) | |
tree | b13a07fd43e0651443a4a95dc5116ad096b8520d /site_scons | |
parent | 002f57193d41f0b8499245958653aa599699b93d (diff) | |
download | mongo-be32f9f467972ffd2e9f37e244c09f88d354faf0.tar.gz |
add NO_CRUTCH option for CppUnit tests
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/unittest.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/site_scons/site_tools/unittest.py b/site_scons/site_tools/unittest.py index 0ce0ae582c1..81462d4483c 100644 --- a/site_scons/site_tools/unittest.py +++ b/site_scons/site_tools/unittest.py @@ -19,8 +19,18 @@ def unit_test_list_builder_action(env, target, source): ofile.close() def build_cpp_unit_test(env, target, source, **kwargs): - kwargs['LIBDEPS'] = kwargs.get('LIBDEPS', []) + ['$BUILD_DIR/mongo/unittest/unittest_main', - '$BUILD_DIR/mongo/unittest/unittest_crutch'] + libdeps = kwargs.get('LIBDEPS', []) + libdeps.append( '$BUILD_DIR/mongo/unittest/unittest_main' ) + + includeCrutch = True + if "NO_CRUTCH" in kwargs: + includeCrutch = not kwargs["NO_CRUTCH"] + + if includeCrutch: + libdeps.append( '$BUILD_DIR/mongo/unittest/unittest_crutch' ) + + kwargs['LIBDEPS'] = libdeps + result = env.Program(target, source, **kwargs) env.RegisterUnitTest(result[0]) return result |