diff options
author | Matthias Eble <psychotrahe@gmx.de> | 2009-06-15 19:45:12 (GMT) |
---|---|---|
committer | Matthias Eble <psychotrahe@gmx.de> | 2009-06-15 19:45:12 (GMT) |
commit | 2e7c3ac75ac62d8e5bfd0b62d60d7b98597bb9ea (patch) | |
tree | c0af8c0d19027063a2bda08de8be4bdd74ae40ad /NPTest.pm | |
parent | 5f673084513315690179009e9aad6420e161f030 (diff) | |
download | monitoring-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.pm | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -18,7 +18,7 @@ use File::Basename; | |||
18 | use IO::File; | 18 | use IO::File; |
19 | use Data::Dumper; | 19 | use Data::Dumper; |
20 | 20 | ||
21 | use Test; | 21 | use Test::More; |
22 | 22 | ||
23 | use vars qw($VERSION); | 23 | use vars qw($VERSION); |
24 | $VERSION = "1556."; # must be all one line, for MakeMaker | 24 | $VERSION = "1556."; # must be all one line, for MakeMaker |
@@ -625,12 +625,12 @@ sub testCmd { | |||
625 | chomp $output; | 625 | chomp $output; |
626 | $object->output($output); | 626 | $object->output($output); |
627 | 627 | ||
628 | my ($pkg, $file, $line) = caller(0); | ||
629 | diag("Testing: $command", $/); | ||
628 | if ($ENV{'NPTEST_DEBUG'}) { | 630 | if ($ENV{'NPTEST_DEBUG'}) { |
629 | my ($pkg, $file, $line) = caller(0); | 631 | diag("testCmd: Called from line $line in $file", $/); |
630 | print "testCmd: Called from line $line in $file", $/; | 632 | diag("Output: ", $object->output, $/); |
631 | print "Testing: $command", $/; | 633 | diag("Return code: ", $object->return_code, $/); |
632 | print "Output: ", $object->output, $/; | ||
633 | print "Return code: ", $object->return_code, $/; | ||
634 | } | 634 | } |
635 | 635 | ||
636 | return $object; | 636 | return $object; |