diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-10-26 13:25:03 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-10-31 12:53:39 -0400 |
commit | 2386f890810afbcf3de898e92acc21cfc74a08f7 (patch) | |
tree | faebe0f943293ee3d9483ebb46bd3e72c0ad67d0 /site_scons | |
parent | c3c5cfb53edc1d5eac54e8b6f543da9bf5752566 (diff) | |
download | mongo-2386f890810afbcf3de898e92acc21cfc74a08f7.tar.gz |
SERVER-7473 Provide functionality for registering "module" tests in SCons.
These tests exist to facilitate writing integration tests for MongoDB modules,
and could also be used to register integration tests for core MongoDB components
that are not written as jstests or dbtests.
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/unittest.py | 8 |
1 files changed, 8 insertions, 0 deletions
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([]) |