-
Notifications
You must be signed in to change notification settings - Fork 7
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
test.sit-test-cases: Redirect test output to a file #67
test.sit-test-cases: Redirect test output to a file #67
Conversation
* smbtorture tests have been configured[1] to print the results irrespective of the outcome. * Test output is now redirected to a separate file[2], additional debug lines from ansible are no longer required. [1] samba-in-kubernetes/sit-test-cases#44 [2] samba-in-kubernetes#67 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
b1b2744
to
39a215f
Compare
* smbtorture tests have been configured[1] to print the results irrespective of the outcome. * Test output is now redirected to a separate file[2], additional debug lines from ansible are no longer required. [1] samba-in-kubernetes/sit-test-cases#44 [2] samba-in-kubernetes#67 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
At the moment you only capture the stdout. Maybe we should capture stderr as well with 2>&1? |
Correct.
But what are we missing? Everything we used to see previously should be redirected to the mentioned file. If there's something that we specifically write to stderr and not stdout, we are already(currently) missing those lines. See test.out.txt as an example for a failure case. |
* smbtorture tests have been configured[1] to print the results irrespective of the outcome. * Test output is now redirected to a separate file[2], additional debug lines from ansible are no longer required. Changes to Makefile is basically the revert of 15b8f61. [1] samba-in-kubernetes/sit-test-cases#44 [2] samba-in-kubernetes#67 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Here's how the console output will look like:
|
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.
ACK
This is fine for now. If we want to consider capturing STDERR later, we can revisit this.
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.
the changes look good to me, but I generally prefer to have a bit more of a justification and explanation of the changes in the commit message and in the PR description. I. E.:
- why is it needed? (what problem does it fix?)
- how is it done? (e.g. mention the output file name in this case.)
- sometimes: why is it done this way?
Approving this one now, but I might request such details for future PRs ...
I've then decided to include STDERR too which seems to be a small addition.
Thanks, let me try to include more details with the next version. |
86d0297
6ba3584
to
86d0297
Compare
Instead of cluttering the jenkins job console output with detailed test results we could redirect everything to a separate file and make it available as artifacts for each job. Simplest way to achieve this redirection is to make use of '&>'[1] to include both STDOUT and STDERR. Location of such an output file is chosen to be under /var/log so that it also gets collected as part of statedump process. [1] https://www.gnu.org/software/bash/manual/html_node/Redirections.html(3.6.4) Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
86d0297
to
e7b7adb
Compare
* smbtorture tests have been configured[1] to print the results irrespective of the outcome. * Test output is now redirected to a separate file[2], additional debug lines from ansible are no longer required. Previous change from 15b8f61 to configure ANSIBLE_STDOUT_CALLBACK option can also be avoided as entire results are now available in a separate file. [1] samba-in-kubernetes/sit-test-cases#44 [2] samba-in-kubernetes#67 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
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.
ACK
/retest centos-ci/cephfs |
/test centos-ci/cephfs |
/retest centos-ci/cephfs |
* smbtorture tests have been configured[1] to print the results irrespective of the outcome. * Test output is now redirected to a separate file[2], additional debug lines from ansible are no longer required. Previous change from 15b8f61 to configure ANSIBLE_STDOUT_CALLBACK option can also be avoided as entire results are now available in a separate file. [1] samba-in-kubernetes/sit-test-cases#44 [2] samba-in-kubernetes#67 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
* smbtorture tests have been configured[1] to print the results irrespective of the outcome. * Test output is now redirected to a separate file[2], additional debug lines from ansible are no longer required. Previous change from 15b8f61 to configure ANSIBLE_STDOUT_CALLBACK option can also be avoided as entire results are now available in a separate file. [1] samba-in-kubernetes/sit-test-cases#44 [2] #67 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Instead of cluttering the jenkins job console output with detailed test results we could redirect everything to a separate file and make it available as artifacts for each job. Simplest way to achieve this redirection is to make use of
&>
(see section 3.6.4 bash manual) to include both STDOUT and STDERR. Location of such an output file is chosen to be under /var/log so that it also gets collected as part of statedump process.