diff options
| author | Martin Schwenke <martin@meltin.net> | 2009-07-03 17:58:38 +1000 |
|---|---|---|
| committer | Martin Schwenke <martin@meltin.net> | 2009-07-03 17:58:38 +1000 |
| commit | dba6c1ca7724a61ddcfb5fa7cc0d4017cb2097e6 (patch) | |
| tree | 193902a8ec40cbfcff085e4a02d645dec83b6bdd | |
| parent | 0d425a07d43ca4996164e7fcc4423231b95d216e (diff) | |
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 <martin@meltin.net>
(This used to be ctdb commit e309cb3f95efcf6cff7d7c19713d7b161a138383)
| -rwxr-xr-x | ctdb/tests/scripts/run_tests | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
