From 9925dbbda86b436896108439ea3e0a31280a6065 Mon Sep 17 00:00:00 2001 From: Johannes Lode Date: Fri, 22 May 2020 01:29:10 +0200 Subject: [PATCH] Improve test coverage by using stderr output in test evaluation of parser and AST testing. --- tests/tests-asn1c-compiler/check-parsing.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests-asn1c-compiler/check-parsing.sh b/tests/tests-asn1c-compiler/check-parsing.sh index 978b7229..9464adb5 100755 --- a/tests/tests-asn1c-compiler/check-parsing.sh +++ b/tests/tests-asn1c-compiler/check-parsing.sh @@ -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