diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-05-24 16:21:23 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-24 12:21:23 -0400 |
commit | 46dc515752bcda939c5c71a0578726acd3167e73 (patch) | |
tree | ebbe45e05e8e1a28608163bf2165dddb9c3a9802 | |
parent | 60f06d2f91a13bec192a76b6665dc441692bf924 (diff) | |
download | gcc-46dc515752bcda939c5c71a0578726acd3167e73.zip gcc-46dc515752bcda939c5c71a0578726acd3167e73.tar.gz gcc-46dc515752bcda939c5c71a0578726acd3167e73.tar.bz2 |
old-dejagnu.exp: All tests fail if we got an internal compiler error for the line.
* lib/old-dejagnu.exp: All tests fail if we got an internal compiler
error for the line. Don't run multiple tests for the same line.
From-SVN: r20028
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/old-dejagnu.exp | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 06b83ff..4a6eb05 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +1998-05-24 Jason Merrill <jason@yorick.cygnus.com> + + * lib/old-dejagnu.exp: All tests fail if we got an internal compiler + error for the line. Don't run multiple tests for the same line. + Sat May 23 23:27:10 1998 Jeffrey A Law (law@cygnus.com) * gcc.dg/980523-1.c: New test. diff --git a/gcc/testsuite/lib/old-dejagnu.exp b/gcc/testsuite/lib/old-dejagnu.exp index 45eb8ac..e029b23 100644 --- a/gcc/testsuite/lib/old-dejagnu.exp +++ b/gcc/testsuite/lib/old-dejagnu.exp @@ -409,6 +409,7 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } { #send_user "\nold_dejagnu.exp: message = :$message:\n\n" #send_user "\nold_dejagnu.exp: message length = [llength $message]\n\n" + set last_line 0 foreach i $message { #send_user "\nold_dejagnu.exp: i = :$i:\n\n" @@ -417,7 +418,21 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } { # in the source file. If we find any, success! set line [lindex $i 0] set pattern [lindex $i 2] - if [regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output] then { + + # Multiple tests one one line don't work, because we remove all + # messages on the line for the first test. So skip later ones. + if { $line == $last_line } { + continue + } + set last_line $line + + # If we crashed on this line, all tests fail. + if [regexp "(^|\n)\[^\n\]+:$line: Internal compiler error\[^\n\]*" $comp_output ] { + regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output + set comp_output [string trimleft $comp_output] + set ok fail + set uhoh fail + } elseif [regsub -all "(^|\n)\[^\n\]+:$line:\[^\n\]*" $comp_output "" comp_output] { set comp_output [string trimleft $comp_output] set ok pass set uhoh fail |