aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-x[-rw-r--r--]tools/testing/ktest/ktest.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 5bd0075..0a5ed0d 100644..100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -230,7 +230,7 @@ sub read_config {
}
}
-sub logit {
+sub _logit {
if (defined($opt{"LOG_FILE"})) {
open(OUT, ">> $opt{LOG_FILE}") or die "Can't write to $opt{LOG_FILE}";
print OUT @_;
@@ -238,9 +238,17 @@ sub logit {
}
}
+sub logit {
+ if (defined($opt{"LOG_FILE"})) {
+ _logit @_;
+ } else {
+ print @_;
+ }
+}
+
sub doprint {
print @_;
- logit @_;
+ _logit @_;
}
sub run_command;