Merge pull request #60506 from php-coder/fix_suppress_gdate_cmd

Automatic merge from submit-queue (batch tested with PRs 60475, 60514, 60506, 59903, 60319). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

sh2ju.sh: suppress `which` command output when gdate not found in $PATH

**What this PR does / why we need it**:
`make quick-verify` (and probably some other commands) doesn't produce a lot of unrelated and useless information to a console now.

Here is the related PR in the upstream: https://github.com/manolo/shell2junit/pull/7

How it was before:
>SUCCESS  verify-pkg-names.sh	1s
>Verifying verify-readonly-packages.sh
>which: no gdate in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/coder/bin:/home/coder/git/bin:/opt/maven/bin:/opt/go1.9.2/bin:/home/coder/.cargo/bin:/home/coder/git/src/github.com/openshift/origin/_output/local/bin/linux/amd64:/home/coder/git/kubernetes/third_party/etcd:/opt/groovy-2.4.12/bin:/home/coder/bin:/home/coder/git/bin:/opt/maven/bin:/opt/go1.9.2/bin:/home/coder/.cargo/bin:/home/coder/git/src/github.com/openshift/origin/_output/local/bin/linux/amd64:/home/coder/git/kubernetes/third_party/etcd:/opt/groovy-2.4.12/bin)
This commit is contained in:
Kubernetes Submit Queue 2018-02-28 07:20:25 -08:00 committed by GitHub
commit 7f49ccd2d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ function juLogClean() {
function juLog() {
suite="";
errfile=/tmp/evErr.$$.log
date=`which gdate || which date`
date=`which gdate 2>/dev/null || which date`
asserts=00; errors=0; total=0; content=""
# parse arguments