forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: upload functional test logs as artifacts
We want logs even if tests fail, so we need some extra logic. Also, we shouldn't create artifacts if there's nothing to upload, so there's extra logic for that too.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2025 The Dash Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
export LC_ALL=C.UTF-8 | ||
|
||
set -eo pipefail | ||
|
||
SH_NAME="$(basename "${0}")" | ||
LOG_DIRECTORY="testlogs" | ||
|
||
if [ ! -d "${LOG_DIRECTORY}" ]; then | ||
echo "${SH_NAME}: '${LOG_DIRECTORY}' directory missing, will skip!"; | ||
exit 0; | ||
elif [ -z "${BUILD_TARGET}" ]; then | ||
echo "${SH_NAME}: BUILD_TARGET not defined, cannot continue!"; | ||
exit 1; | ||
fi | ||
|
||
LOG_ARCHIVE="test_logs-${BUILD_TARGET}.tar.zst" | ||
if [ -f "${LOG_ARCHIVE}" ]; then | ||
echo "${SH_NAME}: ${LOG_ARCHIVE} already exists, cannot continue!"; | ||
exit 1; | ||
fi | ||
|
||
tar --use-compress-program="zstd -T0 -5" -cf "${LOG_ARCHIVE}" "${LOG_DIRECTORY}" | ||
sha256sum "${LOG_ARCHIVE}" > "${LOG_ARCHIVE}.sha256"; |