diff options
-rw-r--r-- | SConstruct | 3 | ||||
-rw-r--r-- | site_scons/site_tools/unittest.py | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 611020d883e..e678326f2d1 100644 --- a/SConstruct +++ b/SConstruct @@ -286,6 +286,7 @@ env = Environment( BUILD_DIR=variantDir, MODULE_LIBDEPS_MONGOD=[], MODULE_LIBDEPS_MONGOS=[], MODULE_LIBDEPS_MONGOSHELL=[], + MODULETEST_ALIAS='moduletests', MODULETEST_LIST='#build/moduletests.txt', MSVS_ARCH=msarch , PYTHON=utils.find_python(), @@ -1121,4 +1122,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', 'unittests', 'moduletests']) diff --git a/site_scons/site_tools/unittest.py b/site_scons/site_tools/unittest.py index 52630455cde..d942fca4e5c 100644 --- a/site_scons/site_tools/unittest.py +++ b/site_scons/site_tools/unittest.py @@ -8,6 +8,10 @@ def register_unit_test(env, test): env._UnitTestList('$UNITTEST_LIST', test) env.Alias('$UNITTEST_ALIAS', test) +def register_module_test(env, test): + env._UnitTestList('$MODULETEST_LIST', test) + env.Alias('$MODULETEST_ALIAS', test) + def unit_test_list_builder_action(env, target, source): print "Generating " + str(target[0]) ofile = open(str(target[0]), 'wb') @@ -41,4 +45,8 @@ def generate(env): env.Append(BUILDERS=dict(_UnitTestList=unit_test_list_builder)) env.AddMethod(register_unit_test, 'RegisterUnitTest') env.AddMethod(build_cpp_unit_test, 'CppUnitTest') + env.AddMethod(register_module_test, 'RegisterModuleTest') env.Alias('$UNITTEST_ALIAS', '$UNITTEST_LIST') + env.Alias('$MODULETEST_ALIAS', '$MODULETEST_LIST') + env.RegisterUnitTest([]) + env.RegisterModuleTest([]) |