diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-02-07 14:57:02 -0500 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-02-07 14:58:02 -0500 |
commit | a303fa31409893303b21c3938c9d34c97cf531a0 (patch) | |
tree | d361e474e442ba4ec80aa0585ff25eb97b491a2a | |
parent | b5563fde2a1a0beac8ce58db619300adc9f3a7d9 (diff) | |
download | mongo-a303fa31409893303b21c3938c9d34c97cf531a0.tar.gz |
SERVER-39358 Disable building `dbtest` when not building jstests or shell.
-rw-r--r-- | SConstruct | 7 | ||||
-rw-r--r-- | src/mongo/dbtests/SConscript | 229 |
2 files changed, 122 insertions, 114 deletions
diff --git a/SConstruct b/SConstruct index c2ad08211b4..a6dfd4998c2 100644 --- a/SConstruct +++ b/SConstruct @@ -3841,7 +3841,12 @@ env.SConscript( variant_dir='$BUILD_DIR', ) -all = env.Alias('all', ['core', 'tools', 'dbtest', 'unittests', 'integration_tests', 'benchmarks']) +allTargets = ['core', 'tools', 'unittests', 'integration_tests', 'benchmarks'] + +if not has_option('noshell') and usemozjs: + allTargets.extend(['dbtest']) + +env.Alias('all', allTargets) # run the Dagger tool if it's installed if should_dagger: diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript index 927842efd57..e0bfe3859ce 100644 --- a/src/mongo/dbtests/SConscript +++ b/src/mongo/dbtests/SConscript @@ -2,6 +2,8 @@ Import("env") Import("get_option") +Import("has_option") +Import("usemozjs") Import("wiredtiger") env = env.Clone() @@ -52,116 +54,117 @@ env.Library( ], ) -dbtest = env.Program( - target="dbtest", - source=[ - 'basictests.cpp', - 'clienttests.cpp', - 'commandtests.cpp', - 'counttests.cpp', - 'cursor_manager_test.cpp', - 'dbhelper_tests.cpp', - 'dbtests.cpp', - 'deferred_writer.cpp', - 'directclienttests.cpp', - 'documentsourcetests.cpp', - 'extensions_callback_real_test.cpp', - 'gle_test.cpp', - 'index_access_method_test.cpp', - 'indexcatalogtests.cpp', - 'indexupdatetests.cpp', - 'insert_test.cpp', - 'jsobjtests.cpp', - 'jsontests.cpp', - 'jstests.cpp', - 'logical_sessions_tests.cpp', - 'matchertests.cpp', - 'mock_dbclient_conn_test.cpp', - 'mock_replica_set_test.cpp', - 'multikey_paths_test.cpp', - 'pdfiletests.cpp', - 'plan_executor_invalidation_test.cpp', - 'plan_ranking.cpp', - 'query_plan_executor.cpp', - 'query_stage_and.cpp', - 'query_stage_cached_plan.cpp', - 'query_stage_collscan.cpp', - 'query_stage_count.cpp', - 'query_stage_count_scan.cpp', - 'query_stage_delete.cpp', - 'query_stage_distinct.cpp', - 'query_stage_ensure_sorted.cpp', - 'query_stage_fetch.cpp', - 'query_stage_ixscan.cpp', - 'query_stage_limit_skip.cpp', - 'query_stage_merge_sort.cpp', - 'query_stage_multiplan.cpp', - 'query_stage_near.cpp', - 'query_stage_sort.cpp', - 'query_stage_sort_key_generator.cpp', - 'query_stage_subplan.cpp', - 'query_stage_tests.cpp', - 'query_stage_trial.cpp', - 'query_stage_update.cpp', - 'querytests.cpp', - 'replica_set_monitor_test.cpp', - 'replica_set_tests.cpp', - 'repltests.cpp', - 'rollbacktests.cpp', - 'socktests.cpp', - 'storage_timestamp_tests.cpp', - 'threadedtests.cpp', - 'updatetests.cpp', - 'validate_tests.cpp', - 'wildcard_access_method_test.cpp', - 'wildcard_multikey_persistence_test.cpp', - ], - LIBDEPS=[ - "$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils", - "$BUILD_DIR/mongo/db/auth/authmongod", - "$BUILD_DIR/mongo/db/bson/dotted_path_support", - "$BUILD_DIR/mongo/db/catalog/multi_index_block", - "$BUILD_DIR/mongo/db/commands/mongod", - "$BUILD_DIR/mongo/db/commands/test_commands_enabled", - "$BUILD_DIR/mongo/db/concurrency/deferred_writer", - "$BUILD_DIR/mongo/db/index/index_access_methods", - "$BUILD_DIR/mongo/db/index/index_build_interceptor", - "$BUILD_DIR/mongo/db/logical_clock", - "$BUILD_DIR/mongo/db/logical_time_metadata_hook", - "$BUILD_DIR/mongo/db/pipeline/document_value_test_util", - "$BUILD_DIR/mongo/db/query/collation/collator_interface_mock", - "$BUILD_DIR/mongo/db/query_exec", - "$BUILD_DIR/mongo/db/query/query_planner_test_lib", - "$BUILD_DIR/mongo/db/query/query_test_service_context", - "$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper", - "$BUILD_DIR/mongo/db/repl/repl_coordinator_interface", - "$BUILD_DIR/mongo/db/repl/replication_consistency_markers_impl", - "$BUILD_DIR/mongo/db/repl/replication_recovery", - "$BUILD_DIR/mongo/db/repl/replmocks", - "$BUILD_DIR/mongo/db/repl/serveronly_repl", - "$BUILD_DIR/mongo/db/repl/storage_interface_impl", - "$BUILD_DIR/mongo/db/s/op_observer_sharding_impl", - "$BUILD_DIR/mongo/db/sessions_collection_standalone", - "$BUILD_DIR/mongo/db/storage/biggie/storage_biggie", - "$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test", - "$BUILD_DIR/mongo/db/storage/kv/kv_engine_core", - "$BUILD_DIR/mongo/db/storage/kv/kv_storage_engine", - "$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger" if wiredtiger else [], - "$BUILD_DIR/mongo/transport/transport_layer_manager", - "$BUILD_DIR/mongo/transport/message_compressor_options_server", - "$BUILD_DIR/mongo/util/clock_source_mock", - "$BUILD_DIR/mongo/util/net/network", - "$BUILD_DIR/mongo/util/progress_meter", - "$BUILD_DIR/mongo/util/version_impl", - "$BUILD_DIR/mongo/shell_core", - "mocklib", - "testframework", - ], - INSTALL_ALIAS=[ - 'tests' - ], -) - -hygienic = get_option('install-mode') == 'hygienic' -if not hygienic: - env.Alias("dbtest", env.Install('#/', dbtest)) +if not has_option('noshell') and usemozjs: + shell_core_env = env.Clone() + dbtest = shell_core_env.Program( + target="dbtest", + source=[ + 'basictests.cpp', + 'clienttests.cpp', + 'commandtests.cpp', + 'counttests.cpp', + 'cursor_manager_test.cpp', + 'dbhelper_tests.cpp', + 'dbtests.cpp', + 'deferred_writer.cpp', + 'directclienttests.cpp', + 'documentsourcetests.cpp', + 'extensions_callback_real_test.cpp', + 'gle_test.cpp', + 'index_access_method_test.cpp', + 'indexcatalogtests.cpp', + 'indexupdatetests.cpp', + 'insert_test.cpp', + 'jsobjtests.cpp', + 'jsontests.cpp', + 'jstests.cpp', + 'logical_sessions_tests.cpp', + 'matchertests.cpp', + 'mock_dbclient_conn_test.cpp', + 'mock_replica_set_test.cpp', + 'multikey_paths_test.cpp', + 'pdfiletests.cpp', + 'plan_executor_invalidation_test.cpp', + 'plan_ranking.cpp', + 'query_plan_executor.cpp', + 'query_stage_and.cpp', + 'query_stage_cached_plan.cpp', + 'query_stage_collscan.cpp', + 'query_stage_count.cpp', + 'query_stage_count_scan.cpp', + 'query_stage_delete.cpp', + 'query_stage_distinct.cpp', + 'query_stage_ensure_sorted.cpp', + 'query_stage_fetch.cpp', + 'query_stage_ixscan.cpp', + 'query_stage_limit_skip.cpp', + 'query_stage_merge_sort.cpp', + 'query_stage_multiplan.cpp', + 'query_stage_near.cpp', + 'query_stage_sort.cpp', + 'query_stage_sort_key_generator.cpp', + 'query_stage_subplan.cpp', + 'query_stage_tests.cpp', + 'query_stage_trial.cpp', + 'query_stage_update.cpp', + 'querytests.cpp', + 'replica_set_monitor_test.cpp', + 'replica_set_tests.cpp', + 'repltests.cpp', + 'rollbacktests.cpp', + 'socktests.cpp', + 'storage_timestamp_tests.cpp', + 'threadedtests.cpp', + 'updatetests.cpp', + 'validate_tests.cpp', + 'wildcard_access_method_test.cpp', + 'wildcard_multikey_persistence_test.cpp', + ], + LIBDEPS=[ + "$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils", + "$BUILD_DIR/mongo/db/auth/authmongod", + "$BUILD_DIR/mongo/db/bson/dotted_path_support", + "$BUILD_DIR/mongo/db/catalog/multi_index_block", + "$BUILD_DIR/mongo/db/commands/mongod", + "$BUILD_DIR/mongo/db/commands/test_commands_enabled", + "$BUILD_DIR/mongo/db/concurrency/deferred_writer", + "$BUILD_DIR/mongo/db/index/index_access_methods", + "$BUILD_DIR/mongo/db/index/index_build_interceptor", + "$BUILD_DIR/mongo/db/logical_clock", + "$BUILD_DIR/mongo/db/logical_time_metadata_hook", + "$BUILD_DIR/mongo/db/pipeline/document_value_test_util", + "$BUILD_DIR/mongo/db/query/collation/collator_interface_mock", + "$BUILD_DIR/mongo/db/query_exec", + "$BUILD_DIR/mongo/db/query/query_planner_test_lib", + "$BUILD_DIR/mongo/db/query/query_test_service_context", + "$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper", + "$BUILD_DIR/mongo/db/repl/repl_coordinator_interface", + "$BUILD_DIR/mongo/db/repl/replication_consistency_markers_impl", + "$BUILD_DIR/mongo/db/repl/replication_recovery", + "$BUILD_DIR/mongo/db/repl/replmocks", + "$BUILD_DIR/mongo/db/repl/serveronly_repl", + "$BUILD_DIR/mongo/db/repl/storage_interface_impl", + "$BUILD_DIR/mongo/db/s/op_observer_sharding_impl", + "$BUILD_DIR/mongo/db/sessions_collection_standalone", + "$BUILD_DIR/mongo/db/storage/biggie/storage_biggie", + "$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test", + "$BUILD_DIR/mongo/db/storage/kv/kv_engine_core", + "$BUILD_DIR/mongo/db/storage/kv/kv_storage_engine", + "$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger" if wiredtiger else [], + "$BUILD_DIR/mongo/transport/transport_layer_manager", + "$BUILD_DIR/mongo/transport/message_compressor_options_server", + "$BUILD_DIR/mongo/util/clock_source_mock", + "$BUILD_DIR/mongo/util/net/network", + "$BUILD_DIR/mongo/util/progress_meter", + "$BUILD_DIR/mongo/util/version_impl", + "$BUILD_DIR/mongo/shell_core", + "mocklib", + "testframework", + ], + INSTALL_ALIAS=[ + 'tests' + ], + ) + hygienic = get_option('install-mode') == 'hygienic' + if not hygienic: + env.Alias("dbtest", env.Install('#/', dbtest)) |