We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eb1721 commit 5a1bed2Copy full SHA for 5a1bed2
tools/testing/ktest/ktest.pl
@@ -4303,6 +4303,14 @@ sub cancel_test {
4303
if ($opt{"CLEAR_LOG"}) {
4304
unlink $opt{"LOG_FILE"};
4305
}
4306
+
4307
+ if (! -e $opt{"LOG_FILE"} && $opt{"LOG_FILE"} =~ m,^(.*/),) {
4308
+ my $dir = $1;
4309
+ if (! -d $dir) {
4310
+ mkpath($dir) or die "Failed to create directories '$dir': $!";
4311
+ print "\nThe log directory $dir did not exist, so it was created.\n";
4312
+ }
4313
4314
open(LOG, ">> $opt{LOG_FILE}") or die "Can't write to $opt{LOG_FILE}";
4315
LOG->autoflush(1);
4316
0 commit comments