From 00db1b5579d1b633a6f6ee9e99e4ee2a03fcb6dc Mon Sep 17 00:00:00 2001 From: Yossi Gottlieb Date: Tue, 8 Dec 2020 16:22:16 +0200 Subject: [PATCH] Fix failing macOS tests due to wc differences. (#8161) --- tests/support/util.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/support/util.tcl b/tests/support/util.tcl index 040a7f7d9..0807ebe45 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -109,7 +109,7 @@ proc wait_done_loading r { # count current log lines in server's stdout proc count_log_lines {srv_idx} { - set _ [exec wc -l < [srv $srv_idx stdout]] + set _ [string trim [exec wc -l < [srv $srv_idx stdout]]] } # returns the number of times a line with that pattern appears in a file @@ -117,7 +117,7 @@ proc count_message_lines {file pattern} { set res 0 # exec fails when grep exists with status other than 0 (when the patter wasn't found) catch { - set res [exec grep $pattern $file 2> /dev/null | wc -l] + set res [string trim [exec grep $pattern $file 2> /dev/null | wc -l]] } return $res }