From dba6c1ca7724a61ddcfb5fa7cc0d4017cb2097e6 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 3 Jul 2009 17:58:38 +1000 Subject: Fix the run_tests script so that the number of columns is never 0. Sometimes "stty size" reports 0, for example when running in a shell under Emacs. In this case, we just change it to 80. Signed-off-by: Martin Schwenke (This used to be ctdb commit e309cb3f95efcf6cff7d7c19713d7b161a138383) --- ctdb/tests/scripts/run_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ctdb/tests/scripts') diff --git a/ctdb/tests/scripts/run_tests b/ctdb/tests/scripts/run_tests index 8df1aecd25..8a87859352 100755 --- a/ctdb/tests/scripts/run_tests +++ b/ctdb/tests/scripts/run_tests @@ -40,7 +40,7 @@ tests_total=0 tests_passed=0 summary="" -rows=$(if tty -s ; then stty size ; else echo x 80 ; fi | sed -e 's@.* @@') +rows=$(if tty -s ; then stty size ; else echo x 80 ; fi | sed -e 's@.* @@' -e 's@^0$@80@') ww=$((rows - 7)) for f; do -- cgit