Fix CTest error handling in new_docker_build.sh
- Capture CTest exit code in CTEST_RESULT variable - Allow script to continue after CTest failures - Log CTest failure information without stopping build - Enables package verification to run after test execution
This commit is contained in:
1 file changed
+5
-2
@@ -1413,10 +1413,13 @@ fi
|
||||
if [[ "${RUN_CTEST}" == "ON" ]]; then
|
||||
if [[ "${INTEGRATION_TEST}" == "ON" ]]; then
|
||||
log_info "Running integration tests (Z-module + Proxies)"
|
||||
ctest --test-dir . --output-on-failure -R "(test_z_|bld_|tab_|wls_)"
|
||||
ctest --test-dir . --output-on-failure -R "(test_z_|bld_|tab_|wls_)" || CTEST_RESULT=$?
|
||||
else
|
||||
log_info "Running CTest"
|
||||
ctest --test-dir . --output-on-failure
|
||||
ctest --test-dir . --output-on-failure || CTEST_RESULT=$?
|
||||
fi
|
||||
if [[ "${CTEST_RESULT:-0}" -ne 0 ]]; then
|
||||
log_info "CTest completed with failures (exit code: ${CTEST_RESULT})"
|
||||
fi
|
||||
else
|
||||
log_info "Skipping CTest"
|
||||
|
||||
Reference in new issue
Block a user