Make do_tests print out the error message in case a test fails #515

Merged
merged 4 commits into from Oct 24, 2016

Conversation

Projects
None yet
4 participants
@jougs
Contributor

jougs commented Oct 7, 2016

Debugging failing tests on Travis is a pain. This PR modifies do_tests.sh to print the script's output to the commandline in case an error occurs. I suggest @heplesser and @DimitriPlotnikov as reviewers.

@heplesser

@jougs Thank you, this is an excellent idea! Before approving, I would still like to see that it works in practice. Could you temporarily add a failing test to demonstrate this?

testsuite/do_tests.sh.in
if test "${msg_dirty}" != "${param_failure}" ; then
explanation="${msg_clean}"
else
explanation="Failed: unexpected exit code ${exit_code}"
- msg_error="$( cat "${TEST_OUTFILE}" )"
+ unexpected_exitcode=true

This comment has been minimized.

@heplesser

heplesser Oct 8, 2016

Contributor

Looks as if indentation is off by one.

@heplesser

heplesser Oct 8, 2016

Contributor

Looks as if indentation is off by one.

This comment has been minimized.

@jougs

jougs Oct 17, 2016

Contributor

Thanks for noticing. I used tabs instead of spaces. Fixed by ab14b92.

@jougs

jougs Oct 17, 2016

Contributor

Thanks for noticing. I used tabs instead of spaces. Fixed by ab14b92.

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Oct 17, 2016

Contributor

@jougs It works! Once you remove the intentionally failing test again, I will approve.

Contributor

heplesser commented Oct 17, 2016

@jougs It works! Once you remove the intentionally failing test again, I will approve.

@gtrensch

👍 works nicely !

@DimitriPlotnikov

This comment has been minimized.

Show comment
Hide comment
@DimitriPlotnikov

DimitriPlotnikov Oct 19, 2016

@jougs I have one clarification question: what is precisely the added value of the script compared to 'make installcheck'?

@jougs I have one clarification question: what is precisely the added value of the script compared to 'make installcheck'?

@jougs

This comment has been minimized.

Show comment
Hide comment
@jougs

jougs Oct 19, 2016

Contributor

@DimitriPlotnikov: It's not the case that one provides a benefit over the other. The two are parts of the same thing. do_tests.sh is run by the installcheck rule in the make process to run all tests in a sensible order.

Contributor

jougs commented Oct 19, 2016

@DimitriPlotnikov: It's not the case that one provides a benefit over the other. The two are parts of the same thing. do_tests.sh is run by the installcheck rule in the make process to run all tests in a sensible order.

@DimitriPlotnikov

This comment has been minimized.

Show comment
Hide comment
@DimitriPlotnikov

DimitriPlotnikov Oct 19, 2016

@jougs OK:)
Yes, also +1 from my side.

@jougs OK:)
Yes, also +1 from my side.

I've reverted the addition of the failing test.

@heplesser heplesser merged commit 65a1aba into nest:master Oct 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment