summaryrefslogtreecommitdiff
path: root/tests/config
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2013-01-24 01:39:14 +0100
committerDavid Lamparter <equinox@diac24.net>2013-04-14 16:01:19 +0200
commitc69905b673812ce6ec2a12960727a27b9b8d6426 (patch)
tree2b7608b8d16bedfafbf734d5a0e8ff26646107f1 /tests/config
parent5bb7e4d12b3a3015208fad5ee0f3c055b704c8c4 (diff)
tests: DejaGNU libzebra
Wrap the few libzebra test programs we have up for DejaGNU. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/unix.exp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/config/unix.exp b/tests/config/unix.exp
index 25ea97f4..b41f072c 100644
--- a/tests/config/unix.exp
+++ b/tests/config/unix.exp
@@ -20,6 +20,24 @@ if { $i >= 0 } {
send_user "IPv6 enabled: $have_ipv6\n"
set xfail 0
+proc onesimple { test_name match } {
+ global verbose
+ global aborted
+ global testprefix
+ if { $aborted > 0 } {
+ untested "$testprefix$test_name"
+ return
+ }
+ if { $verbose > 0 } {
+ send_user "$testprefix$test_name$note\n"
+ }
+ expect {
+ "$match" { pass "$testprefix$test_name"; }
+ eof { fail "$testprefix$test_name"; set aborted 1; }
+ timeout { unresolved "$testprefix$test_name"; set aborted 1; }
+ }
+}
+
proc onetest { test_name note start } {
global aborted
global testprefix