Revision: 1164 Author: tim.bunce Date: Thu Mar 11 03:02:29 2010 Log: Added skip_sitecustomize option to profile_this() and used it in tests.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1164 Modified: /trunk/lib/Devel/NYTProf/Run.pm /trunk/t/10-run.t /trunk/t/40-savesrc.t /trunk/t/42-global.t /trunk/t/44-model.t /trunk/t/61-cputime.t /trunk/t/test81-swash.t /trunk/t/test82-version.t ======================================= --- /trunk/lib/Devel/NYTProf/Run.pm Tue Feb 23 01:40:54 2010 +++ /trunk/lib/Devel/NYTProf/Run.pm Thu Mar 11 03:02:29 2010 @@ -51,6 +51,12 @@ my $out_file = $opt{out_file} || 'nytprof.out'; my @perl = ($this_perl, '-d:NYTProf'); + + # (sadly, testing $Config{usesitecustomize} isn't reliable) + if ($Config{ccflags} =~ /(?<!\w)-DUSE_SITECUSTOMIZE\b/) { + push @perl, '-f' if $opt{skip_sitecustomize}; + } + warn sprintf "profile_this() using %s with NYTPROF=%s\n", join(" ", @perl), $ENV{NYTPROF} || '' if $opt{verbose}; ======================================= --- /trunk/t/10-run.t Mon Nov 16 03:47:10 2009 +++ /trunk/t/10-run.t Thu Mar 11 03:02:29 2010 @@ -19,6 +19,7 @@ $profile = profile_this( src_code => "1+1", out_file => $env->{file}, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; }, ======================================= --- /trunk/t/40-savesrc.t Tue Dec 1 11:36:11 2009 +++ /trunk/t/40-savesrc.t Thu Mar 11 03:02:29 2010 @@ -19,6 +19,7 @@ $profile = profile_this( src_code => $src_code, out_file => $env->{file}, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; ======================================= --- /trunk/t/42-global.t Thu Mar 11 02:57:07 2010 +++ /trunk/t/42-global.t Thu Mar 11 03:02:29 2010 @@ -22,6 +22,7 @@ $profile = profile_this( src_code => $src_code, out_file => $env->{file}, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; ======================================= --- /trunk/t/44-model.t Fri Dec 4 12:40:49 2009 +++ /trunk/t/44-model.t Thu Mar 11 03:02:29 2010 @@ -21,6 +21,7 @@ $profile = profile_this( src_code => $src_code, out_file => $env->{file}, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; ======================================= --- /trunk/t/61-cputime.t Sat Feb 27 12:12:54 2010 +++ /trunk/t/61-cputime.t Thu Mar 11 03:02:29 2010 @@ -28,6 +28,7 @@ out_file => $env->{file}, #htmlopen => 1, verbose => $trace, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; warn "ticks_per_sec ".$profile->attributes->{ticks_per_sec}."\n" ======================================= --- /trunk/t/test81-swash.t Thu Dec 10 03:05:52 2009 +++ /trunk/t/test81-swash.t Thu Mar 11 03:02:29 2010 @@ -26,6 +26,7 @@ $profile = profile_this( src_code => $src_code, out_file => $env->{file}, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; # check if data truncated due to assertion failure ======================================= --- /trunk/t/test82-version.t Tue Feb 16 07:44:10 2010 +++ /trunk/t/test82-version.t Thu Mar 11 03:02:29 2010 @@ -26,6 +26,7 @@ $profile = profile_this( src_code => $src_code, out_file => $env->{file}, + skip_sitecustomize => 1, ); isa_ok $profile, 'Devel::NYTProf::Data'; # check if data was truncated -- 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]
