Skip to content

Commit

Permalink
Log the tool output on failure.
Browse files Browse the repository at this point in the history
Some of these fail on github in strage ways, lets see if we can figure
...
  • Loading branch information
Stefan Sauer committed Feb 10, 2024
1 parent fc19546 commit 781a6b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/bt-cmd-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,29 @@ testPlayCommandWithQuietOption()

testConvertCommand() {
tmpfile=$SHUNIT_TMPDIR/simple2.out.xml
$LIBTOOL $BUZZTRAX_CMD >/dev/null 2>&1 --command=convert -q --input-file=$TESTSONGDIR/simple2.xml --output-file=$tmpfile
$LIBTOOL $BUZZTRAX_CMD >$SHUNIT_TMPDIR/out.log 2>&1 --command=convert -q --input-file=$TESTSONGDIR/simple2.xml --output-file=$tmpfile
if [ ! -r $tmpfile ]; then
cat $SHUNIT_TMPDIR/out.log
fail "output $tmpfile file missing, have: $(ls -al $SHUNIT_TMPDIR/simple2*)"
fi
rm -f $tmpfile
}

testEncodeCommand() {
tmpfile=$SHUNIT_TMPDIR/simple2.wav
$LIBTOOL $BUZZTRAX_CMD >/dev/null 2>&1 --command=encode -q --input-file=$TESTSONGDIR/simple2.xml --output-file=$tmpfile
$LIBTOOL $BUZZTRAX_CMD >$SHUNIT_TMPDIR/out.log 2>&1 --command=encode -q --input-file=$TESTSONGDIR/simple2.xml --output-file=$tmpfile
if [ ! -r $tmpfile ]; then
cat $SHUNIT_TMPDIR/out.log
fail "output $tmpfile file missing, have: $(ls -al $SHUNIT_TMPDIR/simple2*)"
fi
rm -f $tmpfile

}
testEncodeCommandGuessFormat() {
tmpfile=$SHUNIT_TMPDIR/simple2.vorbis.ogg
$LIBTOOL $BUZZTRAX_CMD >/dev/null 2>&1 --command=encode -q --input-file=$TESTSONGDIR/simple2.xml --output-file=$SHUNIT_TMPDIR/simple2
$LIBTOOL $BUZZTRAX_CMD >$SHUNIT_TMPDIR/out.log 2>&1 --command=encode -q --input-file=$TESTSONGDIR/simple2.xml --output-file=$SHUNIT_TMPDIR/simple2
if [ ! -r $tmpfile ]; then
cat $SHUNIT_TMPDIR/out.log
fail "output $tmpfile file missing, have: $(ls -al $SHUNIT_TMPDIR/simple2*)"
fi
rm -f $tmpfile
Expand Down

0 comments on commit 781a6b3

Please sign in to comment.