diff options
author | Janis Johnson <janis187@us.ibm.com> | 2007-11-02 17:54:12 +0000 |
---|---|---|
committer | Janis Johnson <janis@gcc.gnu.org> | 2007-11-02 17:54:12 +0000 |
commit | ea094d1f239ecc2e057ccff9829dbee7c26f142f (patch) | |
tree | 4fe6553e70140dde9e6a9fd380997a8df834fb2f /gcc | |
parent | 30972689348fa98ffa177ecb90eade06d3da5a5d (diff) | |
download | gcc-ea094d1f239ecc2e057ccff9829dbee7c26f142f.zip gcc-ea094d1f239ecc2e057ccff9829dbee7c26f142f.tar.gz gcc-ea094d1f239ecc2e057ccff9829dbee7c26f142f.tar.bz2 |
re PR testsuite/32076 ("gcc.dg/tree-ssa/pr17141-1.c scan-tree-dump locp.*->i =" is the same name twice)
PR testsuite/32076
* lib/scandump.exp (dump-suffix): New.
(scan-dump, scan-dump-times, scan-dump-dem, scan-dump-dem-not):
Include dump suffix in pass/fail messages, put regexp in quotes.
From-SVN: r129858
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/lib/scandump.exp | 32 |
2 files changed, 29 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 900d322..514829c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2007-11-02 Janis Johnson <janis187@us.ibm.com> + + PR testsuite/32076 + * lib/scandump.exp (dump-suffix): New. + (scan-dump, scan-dump-times, scan-dump-dem, scan-dump-dem-not): + Include dump suffix in pass/fail messages, put regexp in quotes. + 2007-11-02 Paolo Carlini <pcarlini@suse.de> PR c++/33495 diff --git a/gcc/testsuite/lib/scandump.exp b/gcc/testsuite/lib/scandump.exp index d9db05b..9dde900 100644 --- a/gcc/testsuite/lib/scandump.exp +++ b/gcc/testsuite/lib/scandump.exp @@ -19,6 +19,13 @@ # # This is largely borrowed from scanasm.exp. +# Extract the constant part of the dump file suffix from the regexp. +# Argument 0 is the regular expression. +proc dump-suffix { arg } { + set idx [expr [string last "." $arg] + 1] + return [string range $arg $idx end] +} + # Utility for scanning compiler result, invoked via dg-final. # Call pass if pattern is present, otherwise fail. # @@ -49,10 +56,11 @@ proc scan-dump { args } { set text [read $fd] close $fd + set suf [dump-suffix [lindex $args 2]] if [regexp -- [lindex $args 1] $text] { - pass "$testcase scan-[lindex $args 0]-dump [lindex $args 1]" + pass "$testcase scan-[lindex $args 0]-dump $suf \"[lindex $args 1]\"" } else { - fail "$testcase scan-[lindex $args 0]-dump [lindex $args 1]" + fail "$testcase scan-[lindex $args 0]-dump $suf \"[lindex $args 1]\"" } } @@ -85,10 +93,11 @@ proc scan-dump-times { args } { set text [read $fd] close $fd + set suf [dump-suffix [lindex $args 3]] if { [llength [regexp -inline -all -- [lindex $args 1] $text]] == [lindex $args 2]} { - pass "$testcase scan-[lindex $args 0]-dump-times [lindex $args 1] [lindex $args 2]" + pass "$testcase scan-[lindex $args 0]-dump-times $suf \"[lindex $args 1]\" [lindex $args 2]" } else { - fail "$testcase scan-[lindex $args 0]-dump-times [lindex $args 1] [lindex $args 2]" + fail "$testcase scan-[lindex $args 0]-dump-times $suf \"[lindex $args 1]\" [lindex $args 2]" } } @@ -120,10 +129,11 @@ proc scan-dump-not { args } { set text [read $fd] close $fd + set suf [dump-suffix [lindex $args 2]] if ![regexp -- [lindex $args 1] $text] { - pass "$testcase scan-[lindex $args 0]-dump-not [lindex $args 1]" + pass "$testcase scan-[lindex $args 0]-dump-not $suf \"[lindex $args 1]\"" } else { - fail "$testcase scan-[lindex $args 0]-dump-not [lindex $args 1]" + fail "$testcase scan-[lindex $args 0]-dump-not $suf \"[lindex $args 1]\"" } } @@ -165,10 +175,11 @@ proc scan-dump-dem { args } { set text [read $fd] close $fd + set suf [dump-suffix [lindex $args 2]] if [regexp -- [lindex $args 1] $text] { - pass "$testcase scan-[lindex $args 0]-dump-dem [lindex $args 1]" + pass "$testcase scan-[lindex $args 0]-dump-dem $suf \"[lindex $args 1]\"" } else { - fail "$testcase scan-[lindex $args 0]-dump-dem [lindex $args 1]" + fail "$testcase scan-[lindex $args 0]-dump-dem $suf \"[lindex $args 1]\"" } } @@ -209,9 +220,10 @@ proc scan-dump-dem-not { args } { set text [read $fd] close $fd + set suf [dump-suffix [lindex $args 2]] if ![regexp -- [lindex $args 1] $text] { - pass "$testcase scan-[lindex $args 0]-dump-dem-not [lindex $args 1]" + pass "$testcase scan-[lindex $args 0]-dump-dem-not $suf \"[lindex $args 1]\"" } else { - fail "$testcase scan-[lindex $args 0]-dump-dem-not [lindex $args 1]" + fail "$testcase scan-[lindex $args 0]-dump-dem-not $suf \"[lindex $args 1]\"" } } |