Improve test coverage by using stderr output in test evaluation of parser and AST testing.

This commit is contained in:
Johannes Lode 2020-05-22 01:29:10 +02:00 committed by Lev Walkin
parent 35ad7e6daa
commit 9925dbbda8
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ for ref in ${top_srcdir}/tests/tests-asn1c-compiler/*.asn1.-*; do
newversion=${template}.new
LANG=C sed -e 's/^found in .*/found in .../' < "$ref" > "$oldversion"
ec=0
(${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-PER "-$flags" "$src" | LANG=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$?
(${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-PER "-$flags" "$src" 2>&1 | LANG=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$?
if [ $? = 0 ]; then
diff $diffArgs "$oldversion" "$newversion" || ec=$?
fi
@ -43,7 +43,7 @@ for ref in ${top_srcdir}/tests/tests-asn1c-compiler/*.asn1.-*; do
fi
rm -f $oldversion $newversion
if [ "$1" = "regenerate" ]; then
${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-PER "-$flags" "$src" > "$ref"
${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-PER "-$flags" "$src" > "$ref" 2>&1
fi
done