diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-06-01 15:26:04 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-06-04 13:08:27 -0400 |
commit | 82544c7d08c033184104a5c9ab115e4047fdbdbd (patch) | |
tree | 69c66e59f3b8f07d464589b802a85271f692b70e /SConstruct | |
parent | c04922ad14ebe43d99ba056b7b3ae79860b8cd91 (diff) | |
download | mongo-82544c7d08c033184104a5c9ab115e4047fdbdbd.tar.gz |
SERVER-5702: Add ability to register unit tests in SCons.
Tests are registered with env.RegisterUnitTest(), or by compiling a C++ unit
test with
env.CppUnitTest('test_name', [test_source_list], LIBDEPS=[...])
The result is that SCons knows how to build a file "build/unittests.txt", one line per test.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 5080ac6abca..32f34dc1e21 100644 --- a/SConstruct +++ b/SConstruct @@ -290,7 +290,9 @@ env = Environment( BUILD_DIR=variantDir, PYTHON=utils.find_python(), SERVER_ARCHIVE='${SERVER_DIST_BASENAME}${DIST_ARCHIVE_SUFFIX}', TARGET_ARCH=msarch , - tools=["default", "gch", "jsheader", "mergelib"], + tools=["default", "gch", "jsheader", "mergelib", "unittest"], + UNITTEST_ALIAS='unittests', + UNITTEST_LIST='#build/unittests.txt', PYSYSPLATFORM=os.sys.platform, PCRE_VERSION='8.30', @@ -1085,4 +1087,4 @@ def clean_old_dist_builds(env, target, source): env.Alias("dist_clean", [], [clean_old_dist_builds]) env.AlwaysBuild("dist_clean") -env.Alias('all', ['core', 'tools', 'clientTests', 'test', 'unittests']) +env.Alias('all', ['core', 'tools', 'clientTests', 'test', '$UNITTEST_ALIAS']) |