Skip to content

Commit d0d672f

Browse files
Merge pull request #35964 from robertapplin/0-better-output-for-doctests-on-nightly
Output doctest logs on nightly
2 parents 8f41f2b + 6399fa1 commit d0d672f

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
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-5
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pipeline {
111111
}
112112
post {
113113
always {
114-
archive_ctest_log()
114+
archive_test_logs()
115115
publish_test_reports()
116116
}
117117
}
@@ -133,7 +133,7 @@ pipeline {
133133
}
134134
post {
135135
always {
136-
archive_ctest_log()
136+
archive_test_logs()
137137
publish_test_reports()
138138
// Workaround for Windows so that failing system tests will fail the build
139139
bat "\"${WIN_BASH}\" -ex -c \"test ${currentBuild.currentResult} != UNSTABLE\""
@@ -157,7 +157,7 @@ pipeline {
157157
}
158158
post {
159159
always {
160-
archive_ctest_log()
160+
archive_test_logs()
161161
publish_test_reports()
162162
}
163163
}
@@ -553,8 +553,8 @@ def archive_standalone_package(platform) {
553553
}
554554
}
555555

556-
def archive_ctest_log(){
557-
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/ctest_log/*.log", fingerprint: true
556+
def archive_test_logs(){
557+
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/test_logs/*.log", fingerprint: true
558558
}
559559

560560
def archive_env_logs(platform) {

buildconfig/Jenkins/Conda/run-tests

+5-5
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
112-
run_with_xvfb cmake --build . --target docs-doctest -j$BUILD_THREADS $WINDOWS_BUILD_OPTIONS
113-
terminate_xvfb_sessions
112+
# 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 > test_logs/doctest_$OSTYPE.log
114114
fi
115115

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

conda/recipes/mantiddocs/build.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ cmake --build . --target StandardTestData
3737
export STANDARD_TEST_DATA_DIR=$SRC_DIR/build/ExternalData/Testing/Data
3838
echo 'datasearch.directories = '$STANDARD_TEST_DATA_DIR'/UnitTest/;'$STANDARD_TEST_DATA_DIR'/DocTest/' >> $PREFIX/bin/Mantid.properties
3939

40-
# Set QT_QPA_PLATFORM=offscreen so we do not need to run with xvfb. Xvfb hides a lot of debug output
41-
export QT_QPA_PLATFORM=offscreen
42-
cmake --build . --target docs-qthelp
40+
# Use QT_QPA_PLATFORM instead of Xvfb because Xvfb hides a lot of the useful output
41+
QT_QPA_PLATFORM=offscreen cmake --build . --target docs-qthelp
4342

4443
cmake --build . --target install

0 commit comments

Comments
 (0)