From: Frank Ch. Eigler Date: Wed, 18 Feb 2015 17:24:52 +0000 (-0500) Subject: PR17962: make dtrace.exp "parser check" test case conditional on pyparsing X-Git-Tag: release-2.7~2 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4b0ab616d40a39fc457c2fff88cf11693ebea9af;p=systemtap.git PR17962: make dtrace.exp "parser check" test case conditional on pyparsing Without pyparsing installed, the test gave a false FAIL: indication. --- diff --git a/testsuite/systemtap.base/dtrace.exp b/testsuite/systemtap.base/dtrace.exp index 57e31f2ec..0928f8c0c 100644 --- a/testsuite/systemtap.base/dtrace.exp +++ b/testsuite/systemtap.base/dtrace.exp @@ -241,25 +241,28 @@ exec rm -f XXX.h # ----------------------------------------------------------------- # test fallback to --no-pyparsing -set ok 0 -verbose -log "$dtrace -C -h -s $pypath -o XXX.h" -spawn $dtrace -C -DDCL_AFTER_PROVIDER -h -s $pypath -o XXX.h -expect { - -re {Warning.*syntax error} {incr ok; exp_continue} - -re {Warning.*--no-pyparsing} {incr ok; exp_continue} - eof { } -} -catch {close}; catch {wait} -if {[file exists XXX.h]} then { - incr ok; -} -if { $ok == 3} { - pass "dtrace parser check" +if {[catch {exec python -c "import pyparsing"} res]} then { + untested "dtrace parser check" } else { - fail "dtrace parser check $ok" + set ok 0 + verbose -log "$dtrace -C -h -s $pypath -o XXX.h" + spawn $dtrace -C -DDCL_AFTER_PROVIDER -h -s $pypath -o XXX.h + expect { + -re {Warning.*syntax error} {incr ok; exp_continue} + -re {Warning.*--no-pyparsing} {incr ok; exp_continue} + eof { } + } + catch {close}; catch {wait} + if {[file exists XXX.h]} then { + incr ok; + } + if { $ok == 3} { + pass "dtrace parser check" + } else { + fail "dtrace parser check $ok" + } + exec rm -f XXX.h } -exec rm -f XXX.h - # ----------------------------------------------------------------- # test -G object file creation