From: Michael Jeanson Date: Wed, 30 Aug 2017 18:29:26 +0000 (-0400) Subject: Port: don't quote wc output in test scripts X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=ce349ade5be2e1c5aac84e4dc2677aa341cdbae9 Port: don't quote wc output in test scripts The 'wc' command on macOS prefixes the count it returns with spaces, if we quote the output it won't be properly converted to integer for the comparison. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/tests/cli/intersection/test_intersection.in b/tests/cli/intersection/test_intersection.in index 07a267fe..7cea9be7 100644 --- a/tests/cli/intersection/test_intersection.in +++ b/tests/cli/intersection/test_intersection.in @@ -26,9 +26,9 @@ test_intersect() { totalevents="$2" intersect="$3" - test "$("${BT_BIN}" "$trace" | wc -l)" = "$totalevents" + test $("${BT_BIN}" "$trace" | wc -l) = "$totalevents" ok $? "$totalevents events in the whole trace" - test "$("${BT_BIN}" --stream-intersection "$trace" 2>/dev/null| wc -l)" = "$intersect" + test $("${BT_BIN}" --stream-intersection "$trace" 2>/dev/null| wc -l) = "$intersect" ok $? "$intersect events in packets intersecting" }