Dejagnu and parallel make tests of gcc

Richard Earnshaw rearnsha@arm.com
Tue Sep 24 08:50:00 GMT 2002


Ok, first question.  Is the copy of dejagnu on sources.redhat.com (the one 
in gdb) the master copy these days, or is there some other mailing list 
for dejagnu framework patches?

I've finally worked out what the problems were with running parallel makes 
for testing gcc and with the patches below I can now run

	gnumake -k -j <some-big-number> check

from the top level and get all the testsuites to run in parallel on a 
cross build.

The problem was the pesky testglue.o file that is used to wrap executables 
that are run on the simulator, or other non-native targets.  This file is 
built by each of check-gcc check-g++ check-objc etc and then removed when 
that check is complete.

On a sequential make that isn't a problem because the next make simply 
rebuilds the file, but on a parallel make it means that the file gets 
removed before some of the tests have finished running.  Unfortunately 
because of the convoluted cross-build configurations that we need to 
support the fix involves changes to both gcc/testsuite/lib and 
dejagnu/lib.  Fortunately each patch can be applied independently without 
affecting or requiring the other.  However, for parallel checks of cross 
targets you do need both.

The first patch is to the gcc testsuite and ensures that if the gcc, g++ 
etc test packages all try to build testglue.c together then there will not 
be a race condition where they build the same object on top of each other. 
 The second patch is to the dejagnu framework itself and ensures that when 
we transfer the object to the (potentially remote) host we use a filename 
that will not conflict with any other -- in this case I've chosen 
${tool}_tg.o, which should be fairly safe.

gcc/testsuite:

<date>  Richard Earnshaw  <rearnsha@arm.com>

	* lib/gcc.exp (gcc_init): Use a filename for the testglue that is
	unique to the tool.
	* lib/g77.exp (g77_init): Likewise.
	* lib/g++.exp (g++_init): Likewise.
	* lib/objc.exp (objc_init): Likewise.

dejagnu:

<date>  Richard Earnshaw  <rearnsha@arm.com>

	* lib/libgloss.exp (build_wrapper): Use a tool-specific filename on
	the host for the testglue.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgloss.patch
Type: text/x-patch
Size: 1198 bytes
Desc: libgloss.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020924/f365cfb2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dejagnu.patch
Type: text/x-patch
Size: 3310 bytes
Desc: dejagnu.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020924/f365cfb2/attachment-0001.bin>


More information about the Gdb-patches mailing list