From 23bc647b357343b64021abf46e8a8c1aeddfbf41 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 23 Sep 2005 17:42:33 +0000 Subject: - remove dangling symlinks after the runs - check if the temporary directory containing the links exists rather than unconditionally creating it for every single applet. --- testsuite/runtest | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'testsuite/runtest') diff --git a/testsuite/runtest b/testsuite/runtest index 32ff462d7..4ac1d3bfe 100755 --- a/testsuite/runtest +++ b/testsuite/runtest @@ -101,15 +101,18 @@ for applet in $applets; do applet=$(echo "$applet" | sed -n 's/\.tests$//p') if [ ${#applet} -ne 0 ] then - mkdir links 2>/dev/null - rm -f links/"$applet" + if [ -d links ]; then + rm -f links/"$applet" + else + mkdir links 2> /dev/null + fi ln -s ${bindir:-../..}/busybox links/"$applet" PATH="$srcdir:$PATH" COMMAND="links/$applet" \ "${srcdir:-.}/$applet".tests if [ $? -ne 0 ]; then status=1; fi fi - done - +rm -f links/* +rmdir links exit $status -- cgit v1.2.3