Skip to content

Commit

Permalink
Cleanup empty nontmp_workdir.
Browse files Browse the repository at this point in the history
A failed test leaves currently two directories, one in tmp and one in
the build directory. The latter seems to stay for most tests empty.
Therefore attempt to remove this directory if it is empty.
  • Loading branch information
bernhardu authored and rocallahan committed Sep 26, 2024
1 parent 1db6339 commit 6f1b173
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ function onexit {
rm -rf $nontmp_workdir
fi
else
echo Test $TESTNAME failed, leaving behind $tmp_workdir and $nontmp_workdir
echo -n Test $TESTNAME failed, leaving behind $tmp_workdir
(rmdir "$nontmp_workdir" 2>/dev/null && echo) || echo " and $nontmp_workdir"
echo To replay the failed test, run
echo " " _RR_TRACE_DIR="$workdir" rr replay
exit 1
Expand Down

0 comments on commit 6f1b173

Please sign in to comment.