tamer: tests/xmli: Reduce output on failure

This won't try the fixpoint test if the prior one fails, which will always
cause that one to fail.  And it further won't attempt the diff on
compilation failure.

DEV-13708
main
Mike Gerwitz 2023-03-08 23:36:09 -05:00
parent 5c60c5fd15
commit 286f4cb679
1 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,7 @@ tamer-flag-or-exit-ok wip-asg-derived-xmli
# so that we can judge whether it needs adjustment.
test-derive-from-src() {
echo '# test-derive-from-src'
"${TAMER_PATH_TAMEC?}" -o "$mypath/out.xmli" --emit xmlo "$mypath/src.xml"
"${TAMER_PATH_TAMEC?}" -o "$mypath/out.xmli" --emit xmlo "$mypath/src.xml" || return
diff <("$P_XMLLINT" --format "$mypath/expected.xml" || echo 'ERR expected.xml') \
<("$P_XMLLINT" --format "$mypath/out.xmli" || echo 'ERR out.xmli')
@ -39,7 +39,7 @@ test-derive-from-src() {
# (`preproc:*` data) from the output so that it will be accepted by TAMER.
test-fixpoint() {
echo '# test-fixpoint'
"${TAMER_PATH_TAMEC?}" -o "$mypath/out-2.xmli" --emit xmlo "$mypath/out.xmli"
"${TAMER_PATH_TAMEC?}" -o "$mypath/out-2.xmli" --emit xmlo "$mypath/out.xmli" || return
diff <("$P_XMLLINT" --format "$mypath/expected.xml" || echo 'ERR expected.xml') \
<("$P_XMLLINT" --format "$mypath/out-2.xmli" || echo 'ERR out.xmli')
@ -49,8 +49,7 @@ test-fixpoint() {
main() {
local fail=
test-derive-from-src || fail=1
test-fixpoint || fail=1
test-derive-from-src && test-fixpoint || fail=1
test -z "$fail" || {
cat << EOF