SERVER-117720: Enable Unit Test Caching (#46886)

GitOrigin-RevId: 32e939303241de0245c3cc3aa68753c9bf5dd3e0
This commit is contained in:
Zack Winter 2026-01-25 22:26:21 -08:00 committed by MongoDB Bot
parent fe4c95565d
commit cbd2f98cec
3 changed files with 7 additions and 5 deletions

View File

@ -428,7 +428,7 @@ common:remote_test --strategy=TestRunner=remote
common:remote_test --features=-thin_archive
common:remote_test --remote_download_outputs=minimal
common:remote_test --test_output=summary
common:remote_test --modify_execution_info=^(CppLink|CppArchive|SolibSymlink|ExtractDebugInfo|StripDebugInfo|CcGenerateIntermediateDwp|CcGenerateDwp)$=-no-remote-cache
common:remote_test --modify_execution_info=^(TestRunner|CppLink|CppArchive|SolibSymlink|ExtractDebugInfo|StripDebugInfo|CcGenerateIntermediateDwp|CcGenerateDwp)$=-no-remote-cache
common:remote_test --remote_download_regex=.*\.core$
test:remote_test --test_tag_filters=-incompatible_with_bazel_remote_test

View File

@ -664,10 +664,7 @@ def _mongo_cc_binary_and_test(
"visibility": visibility,
"testonly": testonly,
"copts": copts,
"data": data + SANITIZER_DATA + select({
"//bazel/platforms:use_mongo_toolchain": ["//:gdb"],
"//conditions:default": [],
}),
"data": data + SANITIZER_DATA,
"tags": tags,
"linkopts": linkopts + rpath_flags + select({
"//bazel/config:thin_lto_enabled": ["-Wl,--threads=" + str(NUM_CPUS)],

View File

@ -86,6 +86,11 @@ bazel_evergreen_shutils::compute_local_arg() {
elif [[ "$mode" == "test" && "${task_name:-}" == "unit_tests" ]]; then
local_arg+=" --config=remote_test"
local_arg+=" --test_timeout=660" # Allow extra 60s for coredump on abort
# Don't cache test results for merge queue and waterfall tasks initially
if [[ "${is_commit_queue:-}" != "true" && "${requester:-}" != "commit" ]]; then
local_arg+=" --cache_test_results=auto"
fi
fi
if bazel_evergreen_shutils::is_ppc64le; then