summaryrefslogtreecommitdiff
path: root/tests/testsuite.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-01-15 12:12:51 -0800
committerBen Pfaff <blp@nicira.com>2010-01-15 15:28:16 -0800
commitf59613353be350c697f76af2bba1205f7a7ad279 (patch)
treeb1edc00c3f65a5a8f410788d50599eb037cb9d10 /tests/testsuite.at
parent24c8ae53303ff25d118bb96d237da21a32085160 (diff)
downloadopenvswitch-f59613353be350c697f76af2bba1205f7a7ad279.tar.gz
tests: New macro OVS_WAIT_WHILE.
For use by upcoming tests.
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 4117f2015..6ec1a8094 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -18,7 +18,7 @@ AT_TESTED([ovs-vswitchd])
AT_TESTED([ovs-vsctl])
AT_TESTED([perl])
-m4_define([OVS_WAIT_UNTIL],
+m4_define([OVS_WAIT],
[AT_CHECK(
[# First try a quick sleep, so that the test completes very quickly
# in the normal case. POSIX doesn't require fractional times to
@@ -30,7 +30,10 @@ m4_define([OVS_WAIT_UNTIL],
sleep 1
$1
done
- exit 1], [0], [ignore], [ignore])])
+ exit 1], [0], [ignore], [ignore], [$2])])
+
+m4_define([OVS_WAIT_UNTIL], [OVS_WAIT([if $1; then exit 0; fi], [$2])])
+m4_define([OVS_WAIT_WHILE], [OVS_WAIT([if $1; then :; else exit 0; fi], [$2])])
m4_include([tests/ovsdb-macros.at])
m4_include([tests/lcov-pre.at])