-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
configure cmd for junit #6574
configure cmd for junit #6574
Conversation
LGTM |
Although I'm still thinking about those indentations... ;) |
@stevekuznetsov I think I'm against indenting like that. I don't think it enhances the readability of the script. |
Agree. I wouldn't expect more than one "package" per test-cmd script, honestly. |
Eh, I'm ok with multiple packages. We sort of did that with "X set of tests: ok". |
@@ -182,16 +184,18 @@ function os::cmd::internal::expect_exit_code_run_grep() { | |||
done | |||
|
|||
if (( cmd_succeeded && test_succeeded )); then | |||
os::text::print_green "SUCCESS after ${time_elapsed}s: ${name}" | |||
os::text::print_green "SUCCESS after ${time_elapsed}s: ${name}" | tee "{JUNIT_REPORT_OUTPUT}" |
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.
I would have expected tee "${JUNIT_REPORT_OUTPUT}"
. Is the dollar sign not needed for some reason?
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.
Someone is going to call this method without JUNIT_RESPORT_OUTPUT
set. Make this command work as expected for them and add a test to the tests for this file to prove that it works.
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.
Make this command work as expected
Without that variable set right now:
- no file is written
- no error is raised
- nothing fails to run
What else is expected?
A few comments. I largely like the change. |
1294b48
to
758b23e
Compare
@@ -55,6 +56,11 @@ tests=( $(find_tests ${1:-.*}) ) | |||
|
|||
# Setup environment | |||
|
|||
if [[ -z "${JUNIT_REPORT_OUTPUT+x}" ]]; then | |||
# if no jUnit report output file is set, throw away our jUnit info | |||
JUNIT_REPORT_OUTPUT="/dev/null" |
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.
@deads2k the jUnit functions need $JUNIT_REPORT_OUTPUT
to be set. I don't think it's reasonable to stick a check in every single function, so instead an if
case like this in any script using jUnit is more appropriate.
758b23e
to
2f30d24
Compare
@deads2k ready for another look |
2f30d24
to
f3af403
Compare
You're setting it in |
[test] |
fi | ||
} | ||
|
||
# os::cmd::internal::mark_attempt marks the end of an attempt in the stdout and stderr log files | ||
# this is used to make the try_until_* output more concise | ||
function os::cmd::internal::mark_attempt() { | ||
echo -e '\x1e' >> "${os_cmd_internal_tmpout}" | tee "${os_cmd_internal_tmperr}" | ||
echo -e '\x1e' >> "${os_cmd_internal_tmpout}" |
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.
Why did this change?
74e2b18
to
a00d89e
Compare
os::util::sed '5,10d' ${BASETMPDIR}/node-config-broken.yaml | ||
os::cmd::expect_failure_and_text "openshift ex validate node-config ${BASETMPDIR}/node-config-broken.yaml" 'ERROR' | ||
echo "validation: ok" | ||
os::test::junit::declare_suite_end |
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.
Since in some places we do, others we don't echo "<group test>: ok"
, how about adding those output as part of os::test::junit::declare_suite_start
and os::test::junit::declare_suite_end
. These know exactly what test suite your in and can output that information. One less line of typing and you have similar output both in the console and in the report, wdyt?
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.
It's an interesting thought. I think before os::cmd
these types of declarations had value in that it was difficult to tell if forward progress was being made or not. What do we gain by keeping them at all now? Also, I decided to not add suite-specific information to os::test::junit:: declare_suite_end
as without a stack that gets hairy on reconciliation.
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.
This can be applied as a followup, of course :)
Still LGTM. |
28c7c59
to
47ace9d
Compare
post-1.2 @soltysh has the merge. |
Tests succeeded but failed on the last step - publishing jUnit XML report. I think @smarterclayton turned that on. Otherwise, green. |
Going to do this post 1.2 once I cut the branch. |
re[test] for good luck |
[test] On Fri, Apr 8, 2016 at 5:25 PM, OpenShift Bot [email protected]
|
conformance flakes on OOM issue: kubernetes/kubernetes#23894
re[test] |
Evaluated for origin test up to 47ace9d |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/2968/) |
@soltysh ping |
@stevekuznetsov still waiting for 1.2 cut |
This is approved for master before 1.2 because it is test infrastructure. |
Upon approval: |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/5609/) (Image: devenv-rhel7_3988) |
Evaluated for origin merge up to 47ace9d |
This pull does the following:
os::cmd
to output to ittest/cmd/*.sh
@deads2k @liggitt @soltysh PTAL - I suggest to look at the first commit only to see changes, or look at the entire changes with whitespace disabled.