From: Karl Williamson Date: Wed, 26 Mar 2014 18:23:33 +0000 (-0600) Subject: Revert "Add support for test.valgrind parallel testing" X-Git-Tag: upstream/5.20.0~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b15e5ad6b6bf8a92f8358bdbd97041539300c6e;p=platform%2Fupstream%2Fperl.git Revert "Add support for test.valgrind parallel testing" This reverts commit f0aff2daa44923f600f6e1f2429a2add2214a9d5 "Add support for test.valgrind parallel testing" This patch was accidentally pushed (by me); it breaks some things. We will wait to add this support until after 5.20 --- diff --git a/Makefile.SH b/Makefile.SH index a032863..4b2ef00 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1510,7 +1510,7 @@ test.valgrind check.valgrind: test_prep @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1 @echo "And of course you have to have valgrind..." $(VALGRIND) $(VG_TEST) || exit 1 - PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' TESTFILE=harness $(RUN_TESTS) choose + PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' $(RUN_TESTS) choose !NO!SUBS! ;; esac diff --git a/t/TEST b/t/TEST index 356bdc2..96eb6a4 100755 --- a/t/TEST +++ b/t/TEST @@ -284,15 +284,16 @@ sub _cmd { if ($ENV{PERL_VALGRIND}) { my $perl_supp = $options->{return_dir} ? "$options->{return_dir}/perl.supp" : "perl.supp"; my $valgrind_exe = $ENV{VALGRIND} // 'valgrind'; - if ($options->{run_dir}) { - $Valgrind_Log = "$options->{run_dir}/$Valgrind_Log"; - } my $vg_opts = $ENV{VG_OPTS} - // "--log-file=$Valgrind_Log " + // '--log-fd=3 ' . "--suppressions=$perl_supp --leak-check=yes " . "--leak-resolution=high --show-reachable=yes " - . "--num-callers=50 --track-origins=yes"; + . "--num-callers=50 --track-origins=yes"; $perl = "$valgrind_exe $vg_opts $perl"; + $redir = "3>$Valgrind_Log"; + if ($options->{run_dir}) { + $Valgrind_Log = "$options->{run_dir}/$Valgrind_Log"; + } } my $args = "$options->{testswitch} $options->{switch} $options->{utf8}"; diff --git a/t/harness b/t/harness index 845b270..1ed70cb 100644 --- a/t/harness +++ b/t/harness @@ -16,7 +16,6 @@ use Config; $::do_nothing = $::do_nothing = 1; require './TEST'; -our $Valgrind_Log; my $Verbose = 0; $Verbose++ while @ARGV && $ARGV[0] eq '-v' && shift; @@ -225,29 +224,10 @@ my $h = TAP::Harness->new({ $options = $options{$test} = _scan_test($test, $type); } - (local $Valgrind_Log = "$test.valgrind-current") =~ s/^.*\///; - return [ split ' ', _cmd($options, $type) ]; }, }); -# Print valgrind output after test completes -if ($ENV{PERL_VALGRIND}) { - $h->callback( - after_test => sub { - my ($job) = @_; - my $test = $job->[0]; - my $vfile = "$test.valgrind-current"; - $vfile =~ s/^.*\///; - - open(my $voutput, '<', $vfile) or return; - print "$test: Valgrind output:\n"; - print "$test: $_" for <$voutput>; - close($voutput); - } - ); -} - if ($state) { $h->callback( after_test => sub {