-
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
os::cmd
sometimes doesn't find text in output
#9371
Comments
os::cmd
sometimes mis-characterizes failure causesos::cmd
sometimes doesn't find text in output
Downloading the logs above, I can't reproduce this error. $ wget https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_check/2943/artifact/origin/artifacts/test-cmd/tmp_stdout.log
$ wget https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_check/2943/artifact/origin/artifacts/test-cmd/tmp_stderr.log
$ export os_cmd_internal_tmpout=./tmp_stdout.log
$ export os_cmd_internal_tmperr=./tmp_stderr.log
$ export grep_args='containerPort: 80'
$ test_result=$( os::cmd::internal::run_collecting_output 'os::cmd::internal::get_results | grep -Eq "${grep_args}"'; echo $? )
$ export test_eval_func=os::cmd::internal::success_func
$ test_succeeded=$( ${test_eval_func} "${test_result}"; echo $? )
$ cause=$(os::cmd::internal::assemble_causes "1" "${test_succeeded}")
$ @Miciah the broken line is here and the functions called there are here and here ... any thoughts on how to better debug? |
@stevekuznetsov, don't you need to expand It's a bit weird that you're telling |
Oh, disregard my first paragraph: $ bar() { declare -p x; }; foo() { eval bar; local x=y; eval bar; }; foo; eval bar
bash: declare: x: not found
declare -- x="y"
bash: declare: x: not found
|
Yeah, re: your second paragraph... I'm not really sure why that happens the way it does. But if it ain't broke... :) |
|
Very interesting ... |
just redirect the |
@liggitt not sure I understand what you mean -- the |
instead of running grep in quiet mode |
@liggitt I see. I think without changing the # old
$ os::cmd::internal::get_results | grep -Eq "${grep_args}"
# new
$ grep -Eq "${grep_args}" <(os::cmd::internal::get_results) |
e.g.
The text was updated successfully, but these errors were encountered: