From: David Zafman Date: Wed, 23 Nov 2016 05:41:17 +0000 (-0800) Subject: test: Handle terminal width 0 case for running test in emacs X-Git-Tag: v11.1.0~190^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12146%2Fhead;p=ceph.git test: Handle terminal width 0 case for running test in emacs Signed-off-by: David Zafman --- diff --git a/src/test/osd/osd-scrub-repair.sh b/src/test/osd/osd-scrub-repair.sh index d33af5cc8c06..242521cc5be3 100755 --- a/src/test/osd/osd-scrub-repair.sh +++ b/src/test/osd/osd-scrub-repair.sh @@ -22,7 +22,7 @@ source $CEPH_ROOT/qa/workunits/ceph-helpers.sh getjson="no" termwidth=$(stty -a | head -1 | sed -e 's/.*columns \([0-9]*\).*/\1/') -if test -n "$termwidth" ; then termwidth="-W ${termwidth}"; fi +if test -n "$termwidth" -a "$termwidth" != "0"; then termwidth="-W ${termwidth}"; fi # Ignore the epoch and filter out the attr '_' value because it has date information and won't match jqfilter='.inconsistents | (.[].shards[].attrs[] | select(.name == "_") | .value) |= "----Stripped-by-test----"'