From 535e8b04b48f447d8b5fec8018c5931b1fb5cda2 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 10 Aug 2012 15:15:24 -0700 Subject: [PATCH] tests: Factor "seq" shell function out into common infrastructure. An upcoming patch will introduce a second user. Signed-off-by: Ben Pfaff --- tests/ovs-ofctl.at | 8 -------- tests/testsuite.at | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index f35ac41ec..2a298c5d2 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -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]) diff --git a/tests/testsuite.at b/tests/testsuite.at index 3ec28d626..e8f749872 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -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]) -- 2.43.0