[icinga-checkins] icinga.org: icinga-core/dev/cgis: Allow DEBUG= 1 for print the executed commands

git at icinga.org git at icinga.org
Sat Feb 25 15:43:47 CET 2012


Module: icinga-core
Branch: dev/cgis
Commit: 72dfbb36cacbeeb322febf3bca1629cb8850efec
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=72dfbb36cacbeeb322febf3bca1629cb8850efec

Author: Alexander Wirt <formorer at debian.org>
Date:   Sat Feb 25 08:25:42 2012 +0100

Allow DEBUG=1 for print the executed commands

---

 t/Icinga/Test.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/t/Icinga/Test.pm b/t/Icinga/Test.pm
index dd55f13..ac91ea7 100644
--- a/t/Icinga/Test.pm
+++ b/t/Icinga/Test.pm
@@ -11,6 +11,7 @@ our @EXPORT_OK = qw( run_cgi);
 use IPC::Run3 qw( run3 );
 
 use FindBin qw($Bin);
+use Env qw( DEBUG );
 
 my $topdir = "$Bin/..";
 my $cgi_dir = "$topdir/cgi";
@@ -26,6 +27,7 @@ sub run_cgi ($$$$) {
         $query_string,
         "$cgi_dir/$cgi"
     );
+    print STDERR "DEBUG: execute $cmd\n", if $DEBUG;
     my ($in, $out, $err) = '';
     run3 ($cmd, \$in, \$out, \$err) or die "cat: $? - $! - $err";
     return $out;





More information about the icinga-checkins mailing list