summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch54
1 files changed, 27 insertions, 27 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
index 0c399ef52c..fea3b00f62 100644
--- a/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
@@ -1,7 +1,7 @@
1From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001 1From e244a72c6f8803550f37e81f72bbae039651013b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 15 Dec 2015 15:50:44 +0200 3Date: Tue, 15 Dec 2015 15:50:44 +0200
4Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats 4Subject: [PATCH] Modify vg_test wrapper to support PTEST formats
5 5
6Change the valgrind regression test script vg_regtest to 6Change the valgrind regression test script vg_regtest to
7support the yocto ptest stdout reporting format. The commit adds 7support the yocto ptest stdout reporting format. The commit adds
@@ -14,7 +14,7 @@ option, --yocto-ptest, the valgrind regression test output is unchanged.
14Enforce 30 seconds limit for the test. 14Enforce 30 seconds limit for the test.
15This resume execution of the remaining tests when valgrind hangs. 15This resume execution of the remaining tests when valgrind hangs.
16 16
17Upstream-Status: Pending 17Upstream-Status: Inappropriate [oe-core specific]
18 18
19Signed-off-by: Dave Lerner <dave.lerner@windriver.com> 19Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
20Signed-off-by: Tudor Florea <tudor.florea@enea.com> 20Signed-off-by: Tudor Florea <tudor.florea@enea.com>
@@ -25,11 +25,11 @@ Increase time limit to 90 s.
25 25
26Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> 26Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
27--- 27---
28 tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++-------------- 28 tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++------------
29 1 file changed, 55 insertions(+), 20 deletions(-) 29 1 file changed, 55 insertions(+), 20 deletions(-)
30 30
31diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in 31diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
32index a441f42..cb05b52 100755 32index ad18800..e4bd8cb 100755
33--- a/tests/vg_regtest.in 33--- a/tests/vg_regtest.in
34+++ b/tests/vg_regtest.in 34+++ b/tests/vg_regtest.in
35@@ -47,6 +47,7 @@ 35@@ -47,6 +47,7 @@
@@ -49,7 +49,7 @@ index a441f42..cb05b52 100755
49 . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n" 49 . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n"
50 . "\n"; 50 . "\n";
51 51
52@@ -186,6 +187,7 @@ my $outer_args; 52@@ -187,6 +188,7 @@ my $run_outer_args = "";
53 my $valgrind_lib = "$tests_dir/.in_place"; 53 my $valgrind_lib = "$tests_dir/.in_place";
54 my $keepunfiltered = 0; 54 my $keepunfiltered = 0;
55 my $looptillfail = 0; 55 my $looptillfail = 0;
@@ -57,7 +57,7 @@ index a441f42..cb05b52 100755
57 57
58 # default filter is the one named "filter_stderr" in the test's directory 58 # default filter is the one named "filter_stderr" in the test's directory
59 my $default_stderr_filter = "filter_stderr"; 59 my $default_stderr_filter = "filter_stderr";
60@@ -244,6 +246,8 @@ sub process_command_line() 60@@ -245,6 +247,8 @@ sub process_command_line()
61 $keepunfiltered = 1; 61 $keepunfiltered = 1;
62 } elsif ($arg =~ /^--loop-till-fail$/) { 62 } elsif ($arg =~ /^--loop-till-fail$/) {
63 $looptillfail = 1; 63 $looptillfail = 1;
@@ -66,7 +66,7 @@ index a441f42..cb05b52 100755
66 } else { 66 } else {
67 die $usage; 67 die $usage;
68 } 68 }
69@@ -365,13 +369,28 @@ sub read_vgtest_file($) 69@@ -376,13 +380,28 @@ sub read_vgtest_file($)
70 #---------------------------------------------------------------------------- 70 #----------------------------------------------------------------------------
71 # Since most of the program time is spent in system() calls, need this to 71 # Since most of the program time is spent in system() calls, need this to
72 # propagate a Ctrl-C enabling us to quit. 72 # propagate a Ctrl-C enabling us to quit.
@@ -100,7 +100,7 @@ index a441f42..cb05b52 100755
100 # if $keepunfiltered, copies $1 to $1.unfiltered.out 100 # if $keepunfiltered, copies $1 to $1.unfiltered.out
101 # renames $0 tp $1 101 # renames $0 tp $1
102 sub filtered_rename($$) 102 sub filtered_rename($$)
103@@ -419,23 +438,25 @@ sub do_diffs($$$$) 103@@ -430,23 +449,25 @@ sub do_diffs($$$$)
104 # A match; remove .out and any previously created .diff files. 104 # A match; remove .out and any previously created .diff files.
105 unlink("$name.$mid.out"); 105 unlink("$name.$mid.out");
106 unlink(<$name.$mid.diff*>); 106 unlink(<$name.$mid.diff*>);
@@ -128,7 +128,7 @@ index a441f42..cb05b52 100755
128 $vgtest =~ /^(.*)\.vgtest/; 128 $vgtest =~ /^(.*)\.vgtest/;
129 my $name = $1; 129 my $name = $1;
130 my $fullname = "$dir/$name"; 130 my $fullname = "$dir/$name";
131@@ -454,7 +475,11 @@ sub do_one_test($$) 131@@ -465,7 +486,11 @@ sub do_one_test($$)
132 } elsif (256 == $prereq_res) { 132 } elsif (256 == $prereq_res) {
133 # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256... 133 # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256...
134 # Prereq failed, skip. 134 # Prereq failed, skip.
@@ -141,7 +141,7 @@ index a441f42..cb05b52 100755
141 return; 141 return;
142 } else { 142 } else {
143 # Bad prereq; abort. 143 # Bad prereq; abort.
144@@ -472,7 +497,7 @@ sub do_one_test($$) 144@@ -483,7 +508,7 @@ sub do_one_test($$)
145 } 145 }
146 # If there is a progB, let's start it in background: 146 # If there is a progB, let's start it in background:
147 printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n", 147 printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
@@ -150,7 +150,7 @@ index a441f42..cb05b52 100755
150 # progB.done used to detect child has finished. See below. 150 # progB.done used to detect child has finished. See below.
151 # Note: redirection of stdout and stderr is before $progB to allow argsB 151 # Note: redirection of stdout and stderr is before $progB to allow argsB
152 # to e.g. redirect stdoutB to stderrB 152 # to e.g. redirect stdoutB to stderrB
153@@ -488,7 +513,8 @@ sub do_one_test($$) 153@@ -499,7 +524,8 @@ sub do_one_test($$)
154 . "touch progB.done) &"); 154 . "touch progB.done) &");
155 } 155 }
156 } else { 156 } else {
@@ -160,7 +160,7 @@ index a441f42..cb05b52 100755
160 } 160 }
161 161
162 # Collect environment variables, if any. 162 # Collect environment variables, if any.
163@@ -529,7 +555,7 @@ sub do_one_test($$) 163@@ -540,7 +566,7 @@ sub do_one_test($$)
164 # Find all the .stdout.exp files. If none, use /dev/null. 164 # Find all the .stdout.exp files. If none, use /dev/null.
165 my @stdout_exps = <$name.stdout.exp*>; 165 my @stdout_exps = <$name.stdout.exp*>;
166 @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps); 166 @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
@@ -169,7 +169,7 @@ index a441f42..cb05b52 100755
169 169
170 # Filter stderr 170 # Filter stderr
171 $stderr_filter_args = $name if (! defined $stderr_filter_args); 171 $stderr_filter_args = $name if (! defined $stderr_filter_args);
172@@ -538,7 +564,7 @@ sub do_one_test($$) 172@@ -549,7 +575,7 @@ sub do_one_test($$)
173 # Find all the .stderr.exp files. At least one must exist. 173 # Find all the .stderr.exp files. At least one must exist.
174 my @stderr_exps = <$name.stderr.exp*>; 174 my @stderr_exps = <$name.stderr.exp*>;
175 (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n"; 175 (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
@@ -178,7 +178,7 @@ index a441f42..cb05b52 100755
178 178
179 if (defined $progB) { 179 if (defined $progB) {
180 # wait for the child to be finished 180 # wait for the child to be finished
181@@ -562,7 +588,7 @@ sub do_one_test($$) 181@@ -573,7 +599,7 @@ sub do_one_test($$)
182 # Find all the .stdoutB.exp files. If none, use /dev/null. 182 # Find all the .stdoutB.exp files. If none, use /dev/null.
183 my @stdoutB_exps = <$name.stdoutB.exp*>; 183 my @stdoutB_exps = <$name.stdoutB.exp*>;
184 @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps); 184 @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
@@ -187,7 +187,7 @@ index a441f42..cb05b52 100755
187 187
188 # Filter stderr 188 # Filter stderr
189 $stderrB_filter_args = $name if (! defined $stderrB_filter_args); 189 $stderrB_filter_args = $name if (! defined $stderrB_filter_args);
190@@ -571,7 +597,7 @@ sub do_one_test($$) 190@@ -582,7 +608,7 @@ sub do_one_test($$)
191 # Find all the .stderrB.exp files. At least one must exist. 191 # Find all the .stderrB.exp files. At least one must exist.
192 my @stderrB_exps = <$name.stderrB.exp*>; 192 my @stderrB_exps = <$name.stderrB.exp*>;
193 (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n"; 193 (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
@@ -196,7 +196,7 @@ index a441f42..cb05b52 100755
196 } 196 }
197 197
198 # Maybe do post-test check 198 # Maybe do post-test check
199@@ -583,7 +609,7 @@ sub do_one_test($$) 199@@ -594,7 +620,7 @@ sub do_one_test($$)
200 # Find all the .post.exp files. If none, use /dev/null. 200 # Find all the .post.exp files. If none, use /dev/null.
201 my @post_exps = <$name.post.exp*>; 201 my @post_exps = <$name.post.exp*>;
202 @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps); 202 @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps);
@@ -205,7 +205,7 @@ index a441f42..cb05b52 100755
205 } 205 }
206 } 206 }
207 207
208@@ -592,6 +618,13 @@ sub do_one_test($$) 208@@ -603,6 +629,13 @@ sub do_one_test($$)
209 print("(cleanup operation failed: $cleanup)\n"); 209 print("(cleanup operation failed: $cleanup)\n");
210 } 210 }
211 211
@@ -219,25 +219,25 @@ index a441f42..cb05b52 100755
219 $num_tests_done++; 219 $num_tests_done++;
220 } 220 }
221 221
222@@ -631,7 +664,7 @@ sub test_one_dir($$) 222@@ -643,7 +676,7 @@ sub test_one_dir($$)
223 my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
224 223
224 my $tests_start_time = time;
225 if ($found_tests) { 225 if ($found_tests) {
226- print "-- Running tests in $full_dir $dashes\n"; 226- print "-- Running tests in $full_dir $dashes\n";
227+ print "-- Running tests in $full_dir $dashes\n" if ($yoctoptest == 0); 227+ print "-- Running tests in $full_dir $dashes\n" if ($yoctoptest == 0);
228 } 228 }
229 foreach my $f (@fs) { 229 foreach my $f (@fs) {
230 if (-d $f) { 230 if (-d $f) {
231@@ -641,7 +674,7 @@ sub test_one_dir($$) 231@@ -657,7 +690,7 @@ sub test_one_dir($$)
232 } 232 my $end_time = "(in $tests_cost_time sec)";
233 } 233 my $end_dashes = "-" x (50 - (length $full_dir)
234 if ($found_tests) { 234 - (length $end_time) - 1);
235- print "-- Finished tests in $full_dir $dashes\n"; 235- print "-- Finished tests in $full_dir $end_time $end_dashes\n";
236+ print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0); 236+ print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0);
237 } 237 }
238 238
239 chdir(".."); 239 chdir("..");
240@@ -667,10 +700,12 @@ sub summarise_results 240@@ -683,10 +716,12 @@ sub summarise_results
241 $num_failures{"stdout"}, plural($num_failures{"stdout"}), 241 $num_failures{"stdout"}, plural($num_failures{"stdout"}),
242 $num_failures{"stderrB"}, plural($num_failures{"stderrB"}), 242 $num_failures{"stderrB"}, plural($num_failures{"stderrB"}),
243 $num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}), 243 $num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}),
@@ -253,5 +253,5 @@ index a441f42..cb05b52 100755
253 print "\n"; 253 print "\n";
254 } 254 }
255-- 255--
2562.6.2 2562.30.2
257 257