summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-08-17 15:22:47 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-08-17 15:22:47 +0000
commit8fd1b07537ba6993094dd98a2e57a878a973bd58 (patch)
tree1f9cb6a0a3e2a329d0b67be966fc3461515806e9 /lib
parent86bcb3dd148f825b9bbc5e1ecc9e435192fa1f86 (diff)
Use readdir() instead of shell globbing to clear out test directory.
This prevents a shell warning if there were no files to remove. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2305 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/sbin/Runtest.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sbin/Runtest.pl b/lib/sbin/Runtest.pl
index 90fb6620..5f4f034c 100644
--- a/lib/sbin/Runtest.pl
+++ b/lib/sbin/Runtest.pl
@@ -413,7 +413,10 @@ sub runtest
print "Running $tp: $testnames[$num]\n";
- unlink(<$tsttop${sep}$tp${sep}*.*>);
+ # clear out test directory
+ opendir (DIR, "$tsttop${sep}$tp");
+ unlink (grep (/.+\..+/, readdir (DIR)));
+ closedir (DIR);
if (! (-e "$current_directory$sep$executable"))
{