tests: Factor "seq" shell function out into common infrastructure.
authorBen Pfaff <blp@nicira.com>
Fri, 10 Aug 2012 22:15:24 +0000 (15:15 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Aug 2012 23:21:04 +0000 (16:21 -0700)
An upcoming patch will introduce a second user.

Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ovs-ofctl.at
tests/testsuite.at

index f35ac41..2a298c5 100644 (file)
@@ -1934,14 +1934,6 @@ AT_CLEANUP
 AT_SETUP([ovs-ofctl diff-flows])
 OVS_VSWITCHD_START
 
-# Prints the integers from $1 to $2, increasing by $3 (default 1) on stdout.
-seq () {
-    while test $1 -le $2; do
-        echo $1
-        set `expr $1 + ${3-1}` $2 $3
-    done
-}
-
 # Add tons of flows to br0.
 for i in `seq 0 1023`; do echo "dl_vlan=$i,actions=drop"; done > add-flows.txt
 AT_CHECK([ovs-ofctl add-flows br0 add-flows.txt])
index 3ec28d6..e8f7498 100644 (file)
@@ -33,6 +33,14 @@ ovs_wait () {
     done
     exit 1
 }
+
+# Prints the integers from $1 to $2, increasing by $3 (default 1) on stdout.
+seq () {
+    while test $1 -le $2; do
+        echo $1
+        set `expr $1 + ${3-1}` $2 $3
+    done
+}
 ]
 m4_divert_pop([PREPARE_TESTS])