Testsuite failures
Mark Mitchell
mark@codesourcery.com
Tue Jun 10 02:58:00 GMT 2003
On Mon, 2003-06-09 at 15:36, David Edelsohn wrote:
> >>>>> Mark Mitchell writes:
>
> Mark> Yes -- that's exactly what it is. I thought that was handled, but
> Mark> DejaGNU outwitted me -- again.
>
> Mark> I'll see what I can do.
>
> If I add
>
> set additional_sources ""
>
> to tls/tls.exp just before the comp_output test, things work. I do not
> know if that is the correct solution.
I'm checking in this patch, which I think will fix that problem.
I tested on i686-pc-linux-gnu, but with weak disabled, which did
reproduce your error condition.
Thanks,
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC
-------------- next part --------------
2003-06-09 Mark Mitchell <mark@codesourcery.com>
* lib/gcc-dg.exp (dg-test): Override the stock definition here.
Index: lib/gcc-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gcc-dg.exp,v
retrieving revision 1.19
diff -c -5 -p -r1.19 gcc-dg.exp
*** lib/gcc-dg.exp 9 Jun 2003 15:33:36 -0000 1.19
--- lib/gcc-dg.exp 10 Jun 2003 02:55:23 -0000
*************** proc dg-require-gc-sections { args } {
*** 292,296 ****
--- 292,324 ----
upvar dg-do-what dg-do-what
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
return
}
}
+
+ # We need to make sure that additional_files and additional_sources
+ # are both cleared out after every test. It is not enough to clear
+ # them out *before* the next test run because gcc-target-compile gets
+ # run directly from some .exp files (outside of any test). (Those
+ # uses should eventually be eliminated.)
+
+ # Because the DG framework doesn't provide a hook that is run at the
+ # end of a test, we must replace dg-test with a wrapper.
+
+ if { [info procs saved-dg-test] == [list] } {
+ rename dg-test saved-dg-test
+
+ proc dg-test { args } {
+ global additional_files
+ global additional_sources
+ global errorInfo
+
+ if { [ catch { eval saved-dg-test $args } errmsg ] } {
+ set saved_info $errorInfo
+ set additional_files ""
+ set additional_sources ""
+ error $errmsg $saved_info
+ }
+ set additional_files ""
+ set additional_sources ""
+ }
+ }
More information about the Gcc
mailing list