From patchwork Fri Mar 16 14:59:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: gfortran testsuite: implicitly cleanup-modules From: Bernhard Reutner-Fischer X-Patchwork-Id: 147212 Message-Id: <20120316145958.GA19127@mx.loc> To: Jakub Jelinek Cc: Richard Guenther , Mike Stump , Mikael Morin , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org, ro@cebitec.uni-bielefeld.de Date: Fri, 16 Mar 2012 15:59:58 +0100 On Fri, Mar 16, 2012 at 11:04:45AM +0100, Bernhard Reutner-Fischer wrote: >The underlying problem is that dejagnu's runtest.exp only allows for a >single "libdir" where it searches for includes -- see comment in >libgomp.exp and libitm.exp > >While just adding more and more load_gcc_lib calls to users outside of >gcc/ is the easy way out, it is (IMHO) error prone (i ran make check >just in gcc and not in toplevel, fixed my script now). > >It would be desirable if dejagnu would just find all the currently >load_gcc_lib'ed files on its own, via load_lib. >One could >- teach dejagnu to treat libdir as a list of paths The attached works for me for a toplevel make -k check (double-checked with individual make check in lib{gomp,itm}). I do not intend to pursue this any further. libgomp/ChangeLog 2012-03-16 Bernhard Reutner-Fischer * testsuite/lib/libgomp.exp: Set libdirs. Remove now redundant manual inclusion of gfortran-dg's dependencies. libitm/ChangeLog 2012-03-16 Bernhard Reutner-Fischer * testsuite/lib/libitm.exp: Set libdirs. Remove now redundant manual inclusion of gcc-dg's dependencies. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 02909f8..54e1e652 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -1,32 +1,12 @@ -# Damn dejagnu for not having proper library search paths for load_lib. -# We have to explicitly load everything that gcc-dg.exp wants to load. +global libdirs +lappend libdirs $srcdir/../../gcc/testsuite/lib -proc load_gcc_lib { filename } { - global srcdir loaded_libs +load_lib dg.exp - load_file $srcdir/../../gcc/testsuite/lib/$filename - set loaded_libs($filename) "" -} +# BUG: gcc-dg calls gcc-set-multilib-library-path but does not load gcc-defs! +load_lib gcc-defs.exp -load_lib dg.exp -load_gcc_lib file-format.exp -load_gcc_lib target-supports.exp -load_gcc_lib target-supports-dg.exp -load_gcc_lib scanasm.exp -load_gcc_lib scandump.exp -load_gcc_lib scanrtl.exp -load_gcc_lib scantree.exp -load_gcc_lib scanipa.exp -load_gcc_lib prune.exp -load_gcc_lib target-libpath.exp -load_gcc_lib wrapper.exp -load_gcc_lib gcc-defs.exp -load_gcc_lib torture-options.exp -load_gcc_lib timeout.exp -load_gcc_lib timeout-dg.exp -load_gcc_lib fortran-modules.exp -load_gcc_lib gcc-dg.exp -load_gcc_lib gfortran-dg.exp +load_lib gfortran-dg.exp set dg-do-what-default run diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp index f322ed5..1ac8f31 100644 --- a/libitm/testsuite/lib/libitm.exp +++ b/libitm/testsuite/lib/libitm.exp @@ -12,34 +12,15 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# Damn dejagnu for not having proper library search paths for load_lib. -# We have to explicitly load everything that gcc-dg.exp wants to load. +global libdirs +lappend libdirs $srcdir/../../gcc/testsuite/lib -proc load_gcc_lib { filename } { - global srcdir loaded_libs +load_lib dg.exp - load_file $srcdir/../../gcc/testsuite/lib/$filename - set loaded_libs($filename) "" -} +# BUG: gcc-dg calls gcc-set-multilib-library-path but does not load gcc-defs! +load_lib gcc-defs.exp -load_lib dg.exp -load_gcc_lib file-format.exp -load_gcc_lib target-supports.exp -load_gcc_lib target-supports-dg.exp -load_gcc_lib scanasm.exp -load_gcc_lib scandump.exp -load_gcc_lib scanrtl.exp -load_gcc_lib scantree.exp -load_gcc_lib scanipa.exp -load_gcc_lib prune.exp -load_gcc_lib target-libpath.exp -load_gcc_lib wrapper.exp -load_gcc_lib gcc-defs.exp -load_gcc_lib torture-options.exp -load_gcc_lib timeout.exp -load_gcc_lib timeout-dg.exp -load_gcc_lib fortran-modules.exp -load_gcc_lib gcc-dg.exp +load_lib gcc-dg.exp set dg-do-what-default run