aboutsummaryrefslogtreecommitdiff
path: root/NPTest.pm
diff options
context:
space:
mode:
authorGravatar Matthias Eble <psychotrahe@gmx.de> 2009-06-15 21:45:12 +0200
committerGravatar Matthias Eble <psychotrahe@gmx.de> 2009-06-15 21:45:12 +0200
commit2e7c3ac75ac62d8e5bfd0b62d60d7b98597bb9ea (patch)
treec0af8c0d19027063a2bda08de8be4bdd74ae40ad /NPTest.pm
parent5f673084513315690179009e9aad6420e161f030 (diff)
downloadmonitoring-plugins-2e7c3ac75ac62d8e5bfd0b62d60d7b98597bb9ea.tar.gz
Make output of "make test" more verbose
This is intended to make error fixing based on tinderbox output easier.
Diffstat (limited to 'NPTest.pm')
-rw-r--r--NPTest.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/NPTest.pm b/NPTest.pm
index 1cd89db7..cbd78c82 100644
--- a/NPTest.pm
+++ b/NPTest.pm
@@ -18,7 +18,7 @@ use File::Basename;
use IO::File;
use Data::Dumper;
-use Test;
+use Test::More;
use vars qw($VERSION);
$VERSION = "1556."; # must be all one line, for MakeMaker
@@ -625,12 +625,12 @@ sub testCmd {
chomp $output;
$object->output($output);
+ my ($pkg, $file, $line) = caller(0);
+ diag("Testing: $command", $/);
if ($ENV{'NPTEST_DEBUG'}) {
- my ($pkg, $file, $line) = caller(0);
- print "testCmd: Called from line $line in $file", $/;
- print "Testing: $command", $/;
- print "Output: ", $object->output, $/;
- print "Return code: ", $object->return_code, $/;
+ diag("testCmd: Called from line $line in $file", $/);
+ diag("Output: ", $object->output, $/);
+ diag("Return code: ", $object->return_code, $/);
}
return $object;