2009-07-27 16:40:11 -07:00
|
|
|
AT_INIT
|
|
|
|
|
2013-04-11 14:08:01 -07:00
|
|
|
AT_COPYRIGHT([Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
|
2009-07-27 16:40:11 -07:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at:
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.])
|
|
|
|
|
|
|
|
AT_TESTED([ovs-vswitchd])
|
2009-09-14 10:05:13 -07:00
|
|
|
AT_TESTED([ovs-vsctl])
|
2009-11-04 15:11:44 -08:00
|
|
|
AT_TESTED([perl])
|
2009-07-27 16:40:11 -07:00
|
|
|
|
2012-02-13 14:47:53 -08:00
|
|
|
m4_divert_push([PREPARE_TESTS])
|
|
|
|
[
|
|
|
|
ovs_wait () {
|
|
|
|
# First try a quick sleep, so that the test completes very quickly
|
|
|
|
# in the normal case. POSIX doesn't require fractional times to
|
|
|
|
# work, so this might not work.
|
|
|
|
sleep 0.1
|
|
|
|
ovs_wait_cond && exit 0
|
|
|
|
# Then wait up to 10 seconds.
|
|
|
|
for d in 0 1 2 3 4 5 6 7 8 9; do
|
|
|
|
sleep 1
|
|
|
|
ovs_wait_cond && exit 0
|
|
|
|
done
|
|
|
|
exit 1
|
|
|
|
}
|
2012-08-10 15:15:24 -07:00
|
|
|
|
|
|
|
# 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
|
|
|
|
}
|
2012-02-13 14:47:53 -08:00
|
|
|
]
|
|
|
|
m4_divert_pop([PREPARE_TESTS])
|
|
|
|
|
2010-01-15 12:12:51 -08:00
|
|
|
m4_define([OVS_WAIT],
|
2009-12-03 14:45:16 -08:00
|
|
|
[AT_CHECK(
|
2012-02-13 14:47:53 -08:00
|
|
|
[ovs_wait_cond () { $1
|
|
|
|
}
|
|
|
|
ovs_wait], [0], [ignore], [ignore], [$2])])
|
|
|
|
m4_define([OVS_WAIT_UNTIL], [OVS_WAIT([$1], [$2])])
|
|
|
|
m4_define([OVS_WAIT_WHILE],
|
|
|
|
[OVS_WAIT([if $1; then return 1; else return 0; fi], [$2])])
|
2009-12-03 14:45:16 -08:00
|
|
|
|
2012-08-20 10:29:39 -07:00
|
|
|
dnl ON_EXIT([COMMANDS])
|
|
|
|
dnl
|
|
|
|
dnl Adds the shell COMMANDS to a collection executed when the current test
|
|
|
|
dnl completes, as a cleanup action. (The most common use is to kill a
|
|
|
|
dnl daemon started by the test. This is important to prevent tests that
|
|
|
|
dnl start daemons from hanging at exit.)
|
|
|
|
m4_define([ON_EXIT], [trap '. ./cleanup' 0; cat >>cleanup <<'EOF'
|
|
|
|
$1
|
|
|
|
EOF
|
|
|
|
])
|
|
|
|
|
2010-01-15 12:12:36 -08:00
|
|
|
m4_include([tests/ovsdb-macros.at])
|
2011-02-22 13:43:14 -08:00
|
|
|
m4_include([tests/ofproto-macros.at])
|
2010-01-15 12:12:36 -08:00
|
|
|
|
2013-07-27 09:58:06 +00:00
|
|
|
m4_include([tests/bfd.at])
|
2013-09-20 06:13:33 +00:00
|
|
|
m4_include([tests/cfm.at])
|
2011-11-28 18:08:49 -08:00
|
|
|
m4_include([tests/lacp.at])
|
2009-07-27 16:40:11 -07:00
|
|
|
m4_include([tests/library.at])
|
2012-01-24 15:07:41 -08:00
|
|
|
m4_include([tests/heap.at])
|
2011-06-10 17:45:45 -07:00
|
|
|
m4_include([tests/bundle.at])
|
2010-05-26 12:48:32 -07:00
|
|
|
m4_include([tests/classifier.at])
|
2010-01-25 10:49:31 -08:00
|
|
|
m4_include([tests/check-structs.at])
|
2010-01-15 12:13:46 -08:00
|
|
|
m4_include([tests/daemon.at])
|
2010-08-25 10:26:40 -07:00
|
|
|
m4_include([tests/daemon-py.at])
|
2012-07-03 22:17:14 -07:00
|
|
|
m4_include([tests/ofp-actions.at])
|
2011-01-12 13:57:53 -08:00
|
|
|
m4_include([tests/ofp-print.at])
|
2012-11-09 10:00:22 -08:00
|
|
|
m4_include([tests/ofp-util.at])
|
2012-03-26 13:46:35 -07:00
|
|
|
m4_include([tests/ofp-errors.at])
|
2010-10-01 13:08:14 -07:00
|
|
|
m4_include([tests/ovs-ofctl.at])
|
2011-08-04 16:20:34 -07:00
|
|
|
m4_include([tests/odp.at])
|
2010-12-17 14:38:50 -08:00
|
|
|
m4_include([tests/multipath.at])
|
2011-09-12 16:19:57 -07:00
|
|
|
m4_include([tests/learn.at])
|
2010-01-08 09:41:29 -08:00
|
|
|
m4_include([tests/vconn.at])
|
2010-11-09 14:38:28 -08:00
|
|
|
m4_include([tests/file_name.at])
|
2009-09-24 15:02:36 -07:00
|
|
|
m4_include([tests/aes128.at])
|
2012-02-16 19:15:01 -08:00
|
|
|
m4_include([tests/unixctl-py.at])
|
2009-09-24 15:02:36 -07:00
|
|
|
m4_include([tests/uuid.at])
|
2009-11-04 14:55:53 -08:00
|
|
|
m4_include([tests/json.at])
|
2009-10-26 15:04:05 -07:00
|
|
|
m4_include([tests/jsonrpc.at])
|
2010-08-25 10:26:40 -07:00
|
|
|
m4_include([tests/jsonrpc-py.at])
|
2013-01-08 17:33:04 -08:00
|
|
|
m4_include([tests/tunnel.at])
|
2009-10-14 16:52:04 -07:00
|
|
|
m4_include([tests/lockfile.at])
|
2009-11-10 15:30:49 -08:00
|
|
|
m4_include([tests/reconnect.at])
|
2013-04-11 14:08:01 -07:00
|
|
|
m4_include([tests/ovs-vswitchd.at])
|
2010-12-02 14:57:53 -08:00
|
|
|
m4_include([tests/ofproto.at])
|
2011-08-09 09:24:18 -07:00
|
|
|
m4_include([tests/ofproto-dpif.at])
|
2013-06-25 14:00:58 -07:00
|
|
|
m4_include([tests/vlan-splinters.at])
|
2009-11-04 15:11:44 -08:00
|
|
|
m4_include([tests/ovsdb.at])
|
2009-09-14 10:05:13 -07:00
|
|
|
m4_include([tests/ovs-vsctl.at])
|
2011-09-23 14:21:19 -07:00
|
|
|
m4_include([tests/ovs-monitor-ipsec.at])
|
2011-09-26 13:07:29 -07:00
|
|
|
m4_include([tests/ovs-xapi-sync.at])
|
2010-02-22 16:28:30 -08:00
|
|
|
m4_include([tests/interface-reconfigure.at])
|
2011-09-20 15:08:05 -07:00
|
|
|
m4_include([tests/stp.at])
|
2011-09-21 15:43:27 -07:00
|
|
|
m4_include([tests/vlog.at])
|