Skip to content

Commit

Permalink
tests/kern/runtest: Delete PATH_EXPDIR and PATH_MNTDIR on failure
Browse files Browse the repository at this point in the history
Some tests leave large files behind otherwise.
  • Loading branch information
snogge committed Aug 29, 2024
1 parent 8ff4c15 commit ce3f94b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/kern/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ fi
"${KERN_SRCDIR}/$TEST" \
>$TEST.out 2>&1
rc=$?

[ -d "$PATH_EXPDIR" ] && rm -rf "$PATH_EXPDIR"
[ -d "$PATH_MNTDIR" ] && rm -rf "$PATH_MNTDIR"

if [ $rc != 0 ]; then
echo "test exited with $rc" >>$TEST.out
exit $rc
fi

[ -d "$PATH_EXPDIR" ] && rm -rf $PATH_EXPDIR
[ -d "$PATH_MNTDIR" ] && rm -rf $PATH_MNTDIR

diff ${KERN_SRCDIR}/$TEST.exp $TEST.out >$TEST.diff
exit $?

0 comments on commit ce3f94b

Please sign in to comment.