Skip to content

Commit 6399fa1

Browse files
committed
Archive doctest logs in same folder as ctest logs
1 parent 3e2288f commit 6399fa1

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

buildconfig/Jenkins/Conda/conda-buildscript

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ fi
139139

140140
# Clean up artifacts from previous builds
141141
rm -f -- *.dmg *.rpm *.deb *.tar.gz *.tar.xz *.exe
142-
# Remove ctest logs from previous builds
143-
rm -rf $BUILD_DIR/ctest_log
142+
# Remove test logs from previous builds
143+
rm -rf $BUILD_DIR/test_logs
144144

145145
# Run the script that handles the build
146146
$SCRIPT_DIR/build $WORKSPACE $CMAKE_PRESET $ENABLE_DOCS $ENABLE_DEV_DOCS $ENABLE_BUILD_CODE $ENABLE_UNIT_TESTS $ENABLE_SYSTEM_TESTS $ENABLE_COVERITY "$EXTRA_CMAKE_FLAGS" $BUILD_THREADS

buildconfig/Jenkins/Conda/nightly_build_and_deploy.jenkinsfile

+5-12
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ pipeline {
111111
}
112112
post {
113113
always {
114-
archive_ctest_log()
115-
archive_doctest_log()
114+
archive_test_logs()
116115
publish_test_reports()
117116
}
118117
}
@@ -134,8 +133,7 @@ pipeline {
134133
}
135134
post {
136135
always {
137-
archive_ctest_log()
138-
archive_doctest_log()
136+
archive_test_logs()
139137
publish_test_reports()
140138
// Workaround for Windows so that failing system tests will fail the build
141139
bat "\"${WIN_BASH}\" -ex -c \"test ${currentBuild.currentResult} != UNSTABLE\""
@@ -159,8 +157,7 @@ pipeline {
159157
}
160158
post {
161159
always {
162-
archive_ctest_log()
163-
archive_doctest_log()
160+
archive_test_logs()
164161
publish_test_reports()
165162
}
166163
}
@@ -556,12 +553,8 @@ def archive_standalone_package(platform) {
556553
}
557554
}
558555

559-
def archive_ctest_log(){
560-
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/ctest_log/*.log", fingerprint: true
561-
}
562-
563-
def archive_doctest_log() {
564-
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/doctest_log.log", fingerprint: true
556+
def archive_test_logs(){
557+
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/test_logs/*.log", fingerprint: true
565558
}
566559

567560
def archive_env_logs(platform) {

buildconfig/Jenkins/Conda/run-tests

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ fi
101101

102102
# Run unit tests
103103
cd $WORKSPACE/build
104-
# mkdir for ctest log
105-
mkdir -p ctest_log
104+
# mkdir for test logs
105+
mkdir -p test_logs
106106
if [[ $ENABLE_UNIT_TESTS == true ]]; then
107-
run_with_xvfb ctest -j$BUILD_THREADS --no-compress-output -T Test -O ctest_log/$OSTYPE.log --schedule-random --output-on-failure --repeat until-pass:3 $WINDOWS_TEST_OPTIONS $WINDOWS_UNITTEST_TIMEOUT_OPTIONS
107+
run_with_xvfb ctest -j$BUILD_THREADS --no-compress-output -T Test -O test_logs/ctest_$OSTYPE.log --schedule-random --output-on-failure --repeat until-pass:3 $WINDOWS_TEST_OPTIONS $WINDOWS_UNITTEST_TIMEOUT_OPTIONS
108108
terminate_xvfb_sessions
109109
fi
110110

111111
if [[ $ENABLE_DOCS == true && $ENABLE_DOC_TESTS == true ]]; then
112112
# Build doctests without using Xvfb for better output when things fail. Output to file due to console memory issues
113-
QT_QPA_PLATFORM=offscreen cmake --build . --target docs-doctest -j$BUILD_THREADS $WINDOWS_BUILD_OPTIONS > doctest_log.log
113+
QT_QPA_PLATFORM=offscreen cmake --build . --target docs-doctest -j$BUILD_THREADS $WINDOWS_BUILD_OPTIONS > test_logs/doctest_$OSTYPE.log
114114
fi
115115

116116
if [[ $ENABLE_SYSTEM_TESTS == true ]]; then

0 commit comments

Comments
 (0)