tests: Factor "seq" shell function out into common infrastructure.
[openvswitch] / tests / testsuite.at
index 3ec28d626cea27a046998242020053e51e9a1623..e8f7498729342a55ea37656e504555000e73a007 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])