tests: Avoid xargs, for FreeBSD compatibility.
authorEd Maste <emaste@freebsd.org>
Tue, 31 Jul 2012 12:24:30 +0000 (08:24 -0400)
committerBen Pfaff <blp@nicira.com>
Tue, 31 Jul 2012 14:50:27 +0000 (07:50 -0700)
The FreeBSD version of xargs does not run the utility argument on empty
input, while GNU xargs runs it at least once, even with empty input.  As
a result on FreeBSD VSCTL_CHECK_FIND returned no output for an empty
bridge list while on Linux it returned a single blank line.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ovs-vsctl.at

index 71c46cd..a6c6749 100644 (file)
@@ -769,7 +769,7 @@ AT_CHECK(
 
 ])
 m4_define([VSCTL_CHECK_FIND],
-  [AT_CHECK([ovs-vsctl --bare --timeout=5 --no-wait -vreconnect:emer --db=unix:socket -- --columns=name find bridge '$1' | sort | xargs echo], [0], [$2
+  [AT_CHECK([echo `ovs-vsctl --bare --timeout=5 --no-wait -vreconnect:emer --db=unix:socket -- --columns=name find bridge '$1' | sort`], [0], [$2
 ])])
 
 # Arithmetic relational operators without keys.