# -*- mode: python -*- Import("env") env = env.Clone() env.Benchmark( target="condition_variable_bm", source=[ "condition_variable_bm.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", ], ) env.CppUnitTest( target="stdx_test", source=[ "unordered_map_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/third_party/abseil-cpp/absl_city", "$BUILD_DIR/third_party/abseil-cpp/absl_hash", "$BUILD_DIR/third_party/abseil-cpp/absl_int128", "$BUILD_DIR/third_party/abseil-cpp/absl_low_level_hash", "$BUILD_DIR/third_party/abseil-cpp/absl_raw_hash_set", ], ) # Specify UNITTEST_HAS_CUSTOM_MAINLINE because it needs low-level control of # thread creation and signals, so it shouldn't use unittest_main and typical # mongo startup routines. env.CppUnitTest( target="sigaltstack_location_test", source=[ "sigaltstack_location_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", ], UNITTEST_HAS_CUSTOM_MAINLINE=True, ) # The tests for `stdx::set_terminate` need to run outside of the mongo unittest harneses. # The tests require altering the global `set_terminate` handler, which our unittest framework # doesn't expect to have happen. Further, the tests have to return successfully from a # terminate condition which interacts poorly with the unittest framework. # # A set of dedicated binaries to each test case is actually the simplest way to accomplish # robust testing of this mechanism. # Needs to be a different test -- It has to have direct control over the `main()` entry point. env.CppUnitTest( target="set_terminate_dispatch_test", source=[ "set_terminate_dispatch_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", ], UNITTEST_HAS_CUSTOM_MAINLINE=True, ) # Needs to be a different test -- It has to have direct control over the `main()` entry point. env.CppUnitTest( target="set_terminate_from_main_die_in_thread_test", source=[ "set_terminate_from_main_die_in_thread_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", ], UNITTEST_HAS_CUSTOM_MAINLINE=True, ) # Needs to be a different test -- It has to have direct control over the `main()` entry point. env.CppUnitTest( target="set_terminate_from_thread_die_in_main_test", source=[ "set_terminate_from_thread_die_in_main_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", ], UNITTEST_HAS_CUSTOM_MAINLINE=True, ) # Needs to be a different test -- It has to have direct control over the `main()` entry point. env.CppUnitTest( target="set_terminate_from_thread_die_in_thread_test", source=[ "set_terminate_from_thread_die_in_thread_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", ], UNITTEST_HAS_CUSTOM_MAINLINE=True, )