Author: tim.bunce
Date: Tue Mar 10 02:38:39 2009
New Revision: 711

Modified:
    trunk/t/lib/NYTProfTest.pm

Log:
Show NYTPROF and stdout of subprocess if it fails.


Modified: trunk/t/lib/NYTProfTest.pm
==============================================================================
--- trunk/t/lib/NYTProfTest.pm  (original)
+++ trunk/t/lib/NYTProfTest.pm  Tue Mar 10 02:38:39 2009
@@ -197,8 +197,12 @@
      open(RV, "$cmd |") or die "Can't execute $cmd: $!\n";
      my @results = <RV>;
      my $ok = close RV;
-    if ($show_stdout or not $ok) { warn $_ for @results }
-    warn "Error status $? from $cmd!\n" if not $ok;
+    if (not $ok) {
+        warn "Error status $? from $cmd!\n";
+        warn "NYTPROF=$ENV{NYTPROF}\n" if $ENV{NYTPROF} and not $opts{v};
+        $show_stdout = 1;
+    }
+    if ($show_stdout) { warn $_ for @results }
      return $ok;
  }


--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to