[ovs-dev] [PATCH 10/13] tests: Add support for 1-argument 'seq' in emulation.

Ben Pfaff blp at ovn.org
Sat Oct 7 00:44:55 UTC 2017


The testsuite has an emulation of the common utility 'seq' that only
supported 2- and 3-argument forms.  This commit adds support for the
1-argument form.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 tests/ovs-macros.at | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index dbce0a5013aa..f452bbeb45cf 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -57,6 +57,9 @@ ovs_wait () {
 
 # Prints the integers from $1 to $2, increasing by $3 (default 1) on stdout.
 seq () {
+    if test $# = 1; then
+        set 1 $1
+    fi
     while test $1 -le $2; do
         echo $1
         set `expr $1 + ${3-1}` $2 $3
-- 
2.10.2



More information about the dev mailing list