diff mbox

Avoid inter-test dependencies in gfortran.dg (PR fortran/56408)

Message ID 20140916091613.GT17454@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Sept. 16, 2014, 9:16 a.m. UTC
On Tue, Sep 16, 2014 at 10:47:17AM +0200, Jakub Jelinek wrote:
> On Tue, Sep 16, 2014 at 10:42:46AM +0200, Jakub Jelinek wrote:
> > > I'm currently seeing a lot of errors in the log of make -j32 -k check.  Similar to the ones below.
> > 
> > Weird.  Works just fine for me, on two different boxes,
> > one with dejagnu 1.5 and one with dejagnu 1.5.1.  There is
> > no dg-save-unknown in gfortran.dg/test_common_binding_labels_2_main.f03,
> > but dg-compile-aux-modules and that is defined in gfortran.dg/dg.exp.
> 
> Looking around in gcc-testresults, for some people (e.g. H.J.'s testresults,
> Andreas Schwab ia64, etc.) it works just fine too,
> https://gcc.gnu.org/ml/gcc-testresults/2014-09/msg01551.html
> shows the same symptomps as you report.  What dejagnu version are you using?

Looking at the prehistoric dejagnu 1.4.4 (11 years old), it has
unconditional:
    # But first rename the existing one so we can restore it afterwards.
    catch {rename dg-save-unknown ""}
    rename unknown dg-save-unknown
    proc unknown { args } {
        return -code error "unknown dg option: $args"
    }
in there while 1.5 has:
    # Define our own "special function" `unknown' so we catch spelling
    # errors.
    # But first rename the existing one so we can restore it afterwards.
    if { [info procs dg-save-unknown] == [list] } {
        rename unknown dg-save-unknown
        proc unknown { args } {
            return -code error "unknown dg option: $args"
        }
    }

Does the following patch fix this?  Works for me with dejagnu 1.5.1.



	Jakub

Comments

VandeVondele Joost Sept. 16, 2014, 9:31 a.m. UTC | #1
> Does the following patch fix this?  Works for me with dejagnu 1.5.1.

and works for me with 1.4.4

Joost
diff mbox

Patch

--- gcc/testsuite/gfortran.dg/dg.exp.jj	2014-09-15 21:45:45.000000000 +0200
+++ gcc/testsuite/gfortran.dg/dg.exp	2014-09-16 11:15:26.766004692 +0200
@@ -39,8 +39,18 @@  proc dg-compile-aux-modules { args } {
 	error "dg-set-target-env-var: needs one argument"
 	return
     }
+
+    set level [info level]
+    if { [info procs dg-save-unknown] != [list] } {
+	rename dg-save-unknown dg-save-unknown-level-$level
+    }
+
     dg-test $gfortran_test_path/[lindex $args 1] "" $gfortran_aux_module_flags
-    # cleanup-modules isn't intentionally invoked here.
+    # cleanup-modules is intentionally not invoked here.
+
+    if { [info procs dg-save-unknown-level-$level] != [list] } {
+	rename dg-save-unknown-level-$level dg-save-unknown
+    }
 }
 
 # Main loop.