diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-08-28 13:51:41 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-08-28 13:51:41 +0200 |
commit | a4433a9da1f21c6536266531308ba231e5efae81 (patch) | |
tree | 5dd8df5e192f5d697c872e9fd6343b379ec1255d | |
parent | 94ac5972b9f23c4b576823d5fc3f54613ff12743 (diff) | |
download | systemtap-steved-a4433a9da1f21c6536266531308ba231e5efae81.tar.gz systemtap-steved-a4433a9da1f21c6536266531308ba231e5efae81.tar.xz systemtap-steved-a4433a9da1f21c6536266531308ba231e5efae81.zip |
Cross check stap_compile.exp stap run result with error messages seen.
-rw-r--r-- | testsuite/lib/stap_compile.exp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/testsuite/lib/stap_compile.exp b/testsuite/lib/stap_compile.exp index a5a9dce0..c8d44203 100644 --- a/testsuite/lib/stap_compile.exp +++ b/testsuite/lib/stap_compile.exp @@ -20,7 +20,20 @@ proc stap_compile { TEST_NAME compile script args } { -re "semantic error:" {incr compile_errors 1; exp_continue} } catch close - wait + set res [wait -i $spawn_id] + set res [lindex $res 3] + + if {($res == 0 && $compile_errors == 0) + || ($res != 0 && $compile_errors > 0)} { + # Expected case. Ignore. Real pass/fail result will come below. + } else { + # stap result doesn't match errors seen. + if {$res == 0} { + fail "${TEST_NAME}_compile successfull, but got error messages" + } else { + fail "${TEST_NAME}_compile failed, but got no error messages" + } + } # If we've got compile errors and the script was supposed to # compile, fail. |