summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2005-09-23 17:42:33 +0000
committerBernhard Reutner-Fischer2005-09-23 17:42:33 +0000
commit23bc647b357343b64021abf46e8a8c1aeddfbf41 (patch)
tree03b52eda63ea8cb33dde336c20b26fea5cb194b5 /testsuite
parent380ad123ac5586ce321b171536a939e296d8b71d (diff)
downloadbusybox-23bc647b357343b64021abf46e8a8c1aeddfbf41.zip
busybox-23bc647b357343b64021abf46e8a8c1aeddfbf41.tar.gz
- remove dangling symlinks after the runs
- check if the temporary directory containing the links exists rather than unconditionally creating it for every single applet.
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/runtest11
1 files changed, 7 insertions, 4 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index 32ff462..4ac1d3b 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