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

cmake: Enable CTEST_OUTPUT_ON_FAILURE to show corelibs-foundation test failure #20314

Merged
merged 1 commit into from
Nov 5, 2018

Conversation

spevans
Copy link
Collaborator

@spevans spevans commented Nov 4, 2018

No description provided.

@spevans
Copy link
Collaborator Author

spevans commented Nov 4, 2018

Please test with the following request:
apple/swift-corelibs-foundation#1748

@swift-ci test Linux

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 4, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8609c1e

@spevans
Copy link
Collaborator Author

spevans commented Nov 4, 2018

Please test with the following request:
apple/swift-corelibs-foundation#1748

@swift-ci test Linux

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 4, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8609c1e

@gottesmm
Copy link
Member

gottesmm commented Nov 4, 2018

@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.

@gottesmm
Copy link
Member

gottesmm commented Nov 4, 2018

Or wait... that is a test enabled by your other PR?

@spevans
Copy link
Collaborator Author

spevans commented Nov 4, 2018

I was just testing ctest's handling of failed tested. This PR enables displaying broken tests for Foundation. The other PR is expected to fail so I can check this one worked.

@spevans
Copy link
Collaborator Author

spevans commented Nov 5, 2018

@swift-ci test linux

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 5, 2018

Build failed
Swift Test Linux Platform
Git Sha - 8609c1e

@spevans
Copy link
Collaborator Author

spevans commented Nov 5, 2018

@swift-ci test linux

@spevans
Copy link
Collaborator Author

spevans commented Nov 5, 2018

@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
Copy link
Member

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?

Copy link
Collaborator Author

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}"
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants