Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output doctest logs on nightly #35964

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildconfig/Jenkins/Conda/conda-buildscript
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ fi

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

# Run the script that handles the build
$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
Expand Down
10 changes: 5 additions & 5 deletions buildconfig/Jenkins/Conda/nightly_build_and_deploy.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pipeline {
}
post {
always {
archive_ctest_log()
archive_test_logs()
publish_test_reports()
}
}
Expand All @@ -133,7 +133,7 @@ pipeline {
}
post {
always {
archive_ctest_log()
archive_test_logs()
publish_test_reports()
// Workaround for Windows so that failing system tests will fail the build
bat "\"${WIN_BASH}\" -ex -c \"test ${currentBuild.currentResult} != UNSTABLE\""
Expand All @@ -157,7 +157,7 @@ pipeline {
}
post {
always {
archive_ctest_log()
archive_test_logs()
publish_test_reports()
}
}
Expand Down Expand Up @@ -553,8 +553,8 @@ def archive_standalone_package(platform) {
}
}

def archive_ctest_log(){
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/ctest_log/*.log", fingerprint: true
def archive_test_logs(){
archiveArtifacts artifacts: "${CHECKOUT_DIR}/build/test_logs/*.log", fingerprint: true
}

def archive_env_logs(platform) {
Expand Down
10 changes: 5 additions & 5 deletions buildconfig/Jenkins/Conda/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ fi

# Run unit tests
cd $WORKSPACE/build
# mkdir for ctest log
mkdir -p ctest_log
# mkdir for test logs
mkdir -p test_logs
if [[ $ENABLE_UNIT_TESTS == true ]]; then
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
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
terminate_xvfb_sessions
fi

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

if [[ $ENABLE_SYSTEM_TESTS == true ]]; then
Expand Down
5 changes: 2 additions & 3 deletions conda/recipes/mantiddocs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ cmake --build . --target StandardTestData
export STANDARD_TEST_DATA_DIR=$SRC_DIR/build/ExternalData/Testing/Data
echo 'datasearch.directories = '$STANDARD_TEST_DATA_DIR'/UnitTest/;'$STANDARD_TEST_DATA_DIR'/DocTest/' >> $PREFIX/bin/Mantid.properties

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

cmake --build . --target install