From b425290a927e46601e93e0af17d2b378b7340381 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Tue, 22 Nov 2016 21:41:17 -0800 Subject: [PATCH] test: Handle terminal width 0 case for running test in emacs Signed-off-by: David Zafman --- src/test/osd/osd-scrub-repair.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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----"' -- 2.47.3