summaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 066a91bf5..ca82d09b2 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -3976,6 +3976,20 @@ sub singletest {
return -1;
}
my $fileContent = join('', @inputfile);
+
+ # make directories if needed
+ my $path = $filename;
+ # cut off the file name part
+ $path =~ s/^(.*)\/[^\/]*/$1/;
+ my @parts = split(/\//, $path);
+ if($parts[0] eq "log") {
+ # the file is in log/
+ my $d = shift @parts;
+ for(@parts) {
+ $d .= "/$_";
+ mkdir $d; # 0777
+ }
+ }
open(OUTFILE, ">$filename");
binmode OUTFILE; # for crapage systems, use binary
if($fileattr{'nonewline'}) {