]> sourceware.org Git - systemtap.git/commitdiff
--modinfo testsuite
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 5 Dec 2011 23:21:42 +0000 (18:21 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 5 Dec 2011 23:21:42 +0000 (18:21 -0500)
tweak expect clauses to consume all lines

testsuite/systemtap.base/modinfo.exp

index cacfbb886a6f389e492e98683691ab697fdb4fd8..c724344002f90a9c66557932d0a277bd0a782883 100644 (file)
@@ -5,7 +5,11 @@ if [file exists $module] { pass "$test compilation" } else { fail "$test compila
 
 set ok 0
 set ko 0
-spawn modinfo $module {
-    -re {^foo:[ \t]*bar\r\n} { incr ok; exp_continue }
+spawn modinfo $module
+expect {
+    -re {^foo:[ ]*bar\r\n} { incr ok; exp_continue }
+    -re {^[a-zA-Z0-9_]*:[^\r\n]*\r\n} { exp_continue }
+    eof { }
 }
-if {$ok == 1} { pass "$test modinfo" } else { fail "$test modinfo" }
+catch { close }; catch { wait }
+if {$ok == 1} { pass "$test modinfo" } else { fail "$test modinfo ($ok $ko)" }
This page took 0.030566 seconds and 5 git commands to generate.