From aa0ba671f3e64858b9c93571383f2a0452eddf26 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Sat, 8 Nov 2014 06:59:47 +0100 Subject: Regression test portability: wc NetBSD wc displays number with leading spaces, which cause arithmeric operations on values from wc -l to fail. Fix the problem by defining a wrappers that removes spaces. BUG: 1129939 Change-Id: I6fa147cf07772f58d9e19e0efd1dae5dad3a4219 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/9076 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/include.rc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/include.rc b/tests/include.rc index 8b06363894e..000005a4e33 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -83,6 +83,11 @@ wc () { fi } ;; +NetBSD) +wc() { + /usr/bin/wc $@ | sed 's/^ *\([0-9]*\).*$/\1/g' +} +;; esac testcnt=`egrep '^[[:space:]]*(EXPECT|EXPECT_NOT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)[[:space:]]' $0 | wc -l` -- cgit