Revision: 1241
Author: [email protected]
Date: Wed May 26 16:01:25 2010
Log: Add more detail of NYTPROF setting combinations when tests fail.

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1241

Modified:
 /trunk/t/lib/NYTProfTest.pm

=======================================
--- /trunk/t/lib/NYTProfTest.pm Thu May 20 15:37:55 2010
+++ /trunk/t/lib/NYTProfTest.pm Wed May 26 16:01:25 2010
@@ -130,6 +130,7 @@
 }

 my %env_influence;
+my %env_failed;


 sub do_foreach_opt_combination {
@@ -160,6 +161,7 @@
         # record what env settings may have influenced the failure
         ++$env_influence{$_}{$env->{$_}}{$failed ? 'fail' : 'pass'}
             for keys %$env;
+        $env_failed{ $ENV{NYTPROF} } = $failed;
     }
 }

@@ -184,13 +186,16 @@
         push @env_influence, sprintf "%15s: %s\n", $envvar,
join ', ', map { "$_ => $variants->{$_}" } sort keys %$variants;
     }
-    %env_influence = ();
-
     if (@env_influence and not defined wantarray) {
+        push @env_influence, sprintf "%s with %s\n",
+                $env_failed{$_} ? 'FAILED' : 'Passed', $_
+            for sort keys %env_failed;
+
diag "SUMMARY: Breakdown of $tag test failures by option settings:";
         diag $_ for @env_influence;
     }

+    %env_influence = ();
     return @env_influence;
 }

--
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