SERVER-117275 Compress coredumps in unit test wrapper (#46919)

GitOrigin-RevId: e63046efaa6b4a4c28282ca8a6180ac8e7f80636
This commit is contained in:
Zack Winter
2026-01-26 11:23:07 -08:00
committed by MongoDB Bot
parent d7806ebc14
commit b061ffb18b
3 changed files with 17 additions and 3 deletions

View File

@@ -428,8 +428,12 @@ 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
# The below line unsets the no-remote-cache execution info for the given strategies
# even though upon first glance it looks like it's setting it.
common:remote_test --modify_execution_info=^(TestRunner|CppLink|CppArchive|SolibSymlink|ExtractDebugInfo|StripDebugInfo|CcGenerateIntermediateDwp|CcGenerateDwp)$=-no-remote-cache
common:remote_test --remote_download_regex=.*\.core$
common:remote_test --remote_download_regex=.*\.(zip|core|mdmp|gz)$
test:remote_test --test_tag_filters=-incompatible_with_bazel_remote_test
# Coverage

View File

@@ -56,8 +56,8 @@ RET=$?
CORE_FILE=$(find -L ./ -name "*.core")
if [ -f "$CORE_FILE" ]; then
CORE_FILENAME="dump_$(date +%s%N).core"
mv $CORE_FILE "$TEST_UNDECLARED_OUTPUTS_DIR/$CORE_FILENAME"
CORE_FILENAME="dump_$(date +%s%N).core.gz"
gzip -c $CORE_FILE >"$TEST_UNDECLARED_OUTPUTS_DIR/$CORE_FILENAME"
echo "Writing coredump to $CORE_FILENAME..."
fi

View File

@@ -11,3 +11,13 @@ for core_file in $core_files; do
ln -sf $core_file $base_name
fi
done
# Find all gzipped core files and decompress them to src
gzipped_core_files=$(/usr/bin/find -H .. bazel-testlogs -name "*.core.gz" 2>/dev/null)
for gzipped_core_file in $gzipped_core_files; do
base_name=$(echo $gzipped_core_file | sed "s/.*\///" | sed "s/\.gz$//")
# Decompress file if it does not already exist
if [ ! -f $base_name ]; then
gunzip -c $gzipped_core_file >$base_name
fi
done