Skip to content

Commit 5af16c7

Browse files
committed
Allow systests to be skipped in PR builds
RE #34850
1 parent 38f8754 commit 5af16c7

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

buildconfig/CMake/PyUnitTest.cmake

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,19 @@ function(PYSYSTEMTEST_ADD_TEST)
7979
# Add all of the individual tests so that they can be run in parallel
8080
foreach(part ${ARGN})
8181
set(_test_name ${part})
82+
if(NOT PR_JOB)
83+
set(_system_test_options "-l information --quiet --output-on-failure")
84+
else()
85+
set(_system_test_options "-l information --quiet --output-on-failure --exclude-in-pull-requests")
86+
endif()
87+
8288
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
83-
add_test(NAME ${_test_name} COMMAND ${CMAKE_BINARY_DIR}/systemtest_no_update.bat -R ${_test_name})
89+
add_test(NAME ${_test_name} COMMAND ${CMAKE_BINARY_DIR}/systemtest_no_update.bat -R ${_test_name}
90+
${_system_test_options}
91+
)
8492
else()
85-
add_test(NAME ${_test_name} COMMAND ${CMAKE_BINARY_DIR}/systemtest_no_update -R ${_test_name} -l information
86-
--quiet --output-on-failure
93+
add_test(NAME ${_test_name} COMMAND ${CMAKE_BINARY_DIR}/systemtest_no_update -R ${_test_name}
94+
${_system_test_options}
8795
)
8896
endif()
8997

buildconfig/Jenkins/Conda/build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ if [[ $OSTYPE == "msys"* ]]; then
3838
BUILD_OPTIONS="$BUILD_OPTIONS --config Release"
3939
fi
4040

41+
if [[ ${JOB_NAME} == *pull_requests* ]]; then
42+
EXTRA_CMAKE_FLAGS+=" -DPR_JOB=True"
43+
fi
44+
4145
# Run CMake using preset and variables
4246
cmake --preset=${CMAKE_PRESET} ${MANTID_DATA_STORE_CMAKE} ${EXTRA_CMAKE_FLAGS} $WORKSPACE
4347

buildconfig/Jenkins/Conda/run-tests

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,5 @@ if [[ $ENABLE_SYSTEM_TESTS == true ]]; then
108108

109109
SYSTEM_TEST_OPTIONS="-j${BUILD_THREADS_SYSTEM_TESTS} --no-compress-output --schedule-random --repeat until-pass:3"
110110

111-
if [[ ${JOB_NAME} == *pull_requests* ]]; then
112-
SYSTEM_TEST_OPTIONS+=" --exclude-in-pull-requests"
113-
fi
114-
115111
run_with_xvfb ctest -L SystemTest -T Test -O test_logs/systest_$OSTYPE.log $SYSTEM_TEST_OPTIONS $WINDOWS_TEST_OPTIONS
116112
fi

0 commit comments

Comments
 (0)