-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
cmake: Enable CTEST_OUTPUT_ON_FAILURE to show corelibs-foundation test failure #20314
Conversation
Please test with the following request: @swift-ci test Linux |
Build failed |
Please test with the following request: @swift-ci test Linux |
Build failed |
@spevans looks like there is an error in Foundation test. Can we XFAIL/file an SR. I would love to get us to a green build on 14.04 if possible. |
Or wait... that is a test enabled by your other PR? |
I was just testing |
@swift-ci test linux |
Build failed |
@swift-ci test linux |
@swift-ci test and merge |
@@ -3181,6 +3181,7 @@ for host in "${ALL_HOSTS[@]}"; do | |||
) | |||
|
|||
[[ -z "${DISTCC}" ]] || EXTRA_DISTCC_OPTIONS=("DISTCC_HOSTS=localhost,lzo,cpp") | |||
export CTEST_OUTPUT_ON_FAILURE=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spevans This is going to export it for the rest of build-script-impl's invocation. I think it may cause weird confusion for people unless it is put in global scope at the top of build-script-impl with a nice comment. That or put it on the actual test command for Foundation below.
Can you make that change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gottesmm I did originally try and enable it in swift-corelibs-foundation
's cmake config but could not get it to work, does the following look ok?
index e7bf8f734b..0d619392fc 100755
--- a/utils/build-script-impl
+++ b/utils/build-script-impl
@@ -2853,6 +2853,10 @@ for host in "${ALL_HOSTS[@]}"; do
# Calculate test targets
calculate_targets_for_host $host
+ # If the tests for a product fail, make ctest output the full test output
+ # instead of just printing that some of the tests failed.
+ export CTEST_OUTPUT_ON_FAILURE=1
+
# Run the tests for each product
for product in "${PRODUCTS[@]}"; do
# Check if we should perform this action.
@@ -3181,7 +3185,6 @@ for host in "${ALL_HOSTS[@]}"; do
)
[[ -z "${DISTCC}" ]] || EXTRA_DISTCC_OPTIONS=("DISTCC_HOSTS=localhost,lzo,cpp")
- export CTEST_OUTPUT_ON_FAILURE=1
with_pushd "$(build_directory ${host} foundation)" \
call env "${EXTRA_DISTCC_OPTIONS[@]}" "${CMAKE}" "${cmake_options[@]}" "${EXTRA_CMAKE_OPTIONS[@]}" "${FOUNDATION_SOURCE_DIR}"
No description provided.