diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl old mode 100644 new mode 100755 index 5bd00755727c6c3d72d125b4e9eacbd7bed90854..0a5ed0db4ff32015535e5336e421cd256ba40bc9 --- 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;