Output the diff's sum for unexpected diffs as well (used to only output it when ...
12 years, 9 months ago
(2011-07-18 23:36:37 UTC)
#1
Output the diff's sum for unexpected diffs as well (used to only output it when
it had changed, but outputting it for new diffs will make it easier to generate
the comment required to mark this diff as expected when needed).
Also switched from using exec calls to tr/cut, now using native TCL functions as
suggested by Andreas Schwab in issue 4744043 (which was already commited then).
2011-07-18 Gabriel Charette <gchare@google.com>
* lib/dg-pph.exp (dg-pph-pos): Output actualSum on unexpected diff.
Use native TCL functions instead of exec calls to tr and cut.
diff --git a/gcc/testsuite/lib/dg-pph.exp b/gcc/testsuite/lib/dg-pph.exp
index b285ccf..013ccfe 100644
--- a/gcc/testsuite/lib/dg-pph.exp
+++ b/gcc/testsuite/lib/dg-pph.exp
@@ -142,16 +142,16 @@ proc dg-pph-pos { subdir test options mapflag suffix } {
file_on_host delete "$bname.s+pph"
} elseif { $adiff == 1 } {
verbose -log "Diff obtained:\n$diff_result"
+ set actualSum [lindex [split [exec sum << $diff_result] " "] 0]
if { $xdiff } {
- set expectedSum [exec tr -d \} << [exec cut -f 4 -d\ << $xdiff_entry]]
- set actualSum [exec cut -f 1 -d\ << [exec sum << $diff_result]]
+ set expectedSum [lindex [split $xdiff_entry " \}"] 3]
if { $expectedSum == $actualSum } {
xfail "$nshort $options (assembly comparison)"
} else {
fail "$nshort $options (assembly comparison, sums
$expectedSum=>$actualSum)"
}
} else {
- fail "$nshort $options (assembly comparison)"
+ fail "$nshort $options (assembly comparison, sum=$actualSum)"
}
} else {
fail "$nshort $options comparison failure"
--
This patch is available for review at http://codereview.appspot.com/4768041
On Mon, Jul 18, 2011 at 19:36, Gabriel Charette <gchare@google.com> wrote: > 2011-07-18 Gabriel Charette ...
12 years, 9 months ago
(2011-07-19 01:07:22 UTC)
#2
On Mon, Jul 18, 2011 at 19:36, Gabriel Charette <gchare@google.com> wrote:
> 2011-07-18 Gabriel Charette <gchare@google.com>
>
> * lib/dg-pph.exp (dg-pph-pos): Output actualSum on unexpected diff.
> Use native TCL functions instead of exec calls to tr and cut.
OK.
Diego.
Issue 4768041: [pph] Output checksum for new unexpected diff
(Closed)
Created 12 years, 9 months ago by Gabriel Charette
Modified 12 years, 9 months ago
Reviewers: Lawrence Crowl, Diego Novillo
Base URL:
Comments: 0