Merge pull request #3998 from rgerhards/tb-python3-2

testbench: fix some python env-induced issues
This commit is contained in:
Rainer Gerhards 2019-11-29 15:30:50 +01:00 committed by GitHub
commit 71561b0d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ add_conf '
module(load="../contrib/improg/.libs/improg") module(load="../contrib/improg/.libs/improg")
template(name="outfmt" type="string" string="#%msg%#\n") template(name="outfmt" type="string" string="#%msg%#\n")
input(type="improg" tag="tag" ruleset="ruleset" input(type="improg" tag="tag" ruleset="ruleset"
binary="'$srcdir'/improg-multiline-test.py" binary="'$PYTHON' '$srcdir'/improg-multiline-test.py"
confirmmessages="off" closetimeout="2000" confirmmessages="off" closetimeout="2000"
) )
ruleset(name="ruleset") { ruleset(name="ruleset") {

View File

@ -13,7 +13,7 @@ template(name="outfmt" type="string" string="-%$!%-\n")
if $msg contains "msgnum:" then { if $msg contains "msgnum:" then {
action(type="mmexternal" interface.input="fulljson" action(type="mmexternal" interface.input="fulljson"
binary="'${srcdir}'/testsuites/mmexternal-SegFault-mm-python.py") binary="'$PYTHON' '${srcdir}'/testsuites/mmexternal-SegFault-mm-python.py")
action(type="omfile" template="outfmt" file="'$RSYSLOG_OUT_LOG'") action(type="omfile" template="outfmt" file="'$RSYSLOG_OUT_LOG'")
} }
' '

View File

@ -25,7 +25,7 @@ else
LINE_LENGTH=511 # 512 minus 1 byte (for the newline char) LINE_LENGTH=511 # 512 minus 1 byte (for the newline char)
fi fi
export command_line="$srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH" export command_line="$PYTHON $srcdir/testsuites/omprog-output-capture-mt-bin.py $LINE_LENGTH"
empty_check() { empty_check() {
if [ $(wc -l < "$RSYSLOG_OUT_LOG") -eq $((NUMMESSAGES * 2)) ]; then if [ $(wc -l < "$RSYSLOG_OUT_LOG") -eq $((NUMMESSAGES * 2)) ]; then
return 0 return 0