This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: testsuite/25741: Gcc testsuite isn't parallel build safe


The problem is gcc testsuite uses the same tmpdir for testcases of
differrent compilers. It is very hard to avoid the same prefix being
used in different testcases for different compilers. As the result,
"make -j 4 check" may lead to testcases for different compilers with
the same prefix may override each other. This patch sets a different
tmpdir for each compiler. The result is at

http://gcc.gnu.org/ml/gcc-testresults/2006-01/msg00551.html


H.J.
---
gcc/

2006-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/25741
	* Makefile.in (check-%): Depend on site.exp instead of
	$(TESTSUITEDIR)/site.exp. Run "runtest" in separate language
	directories.

gcc/testsuite/

2006-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/25741
	* lib/g++.exp (g++_init): Use $base_dir/../../ instead of
	$base_dir/../.
	* lib/gfortran.exp (gfortran_init): Likewise.
	* lib/obj-c++.exp (obj-c++_init): Likewise.
	* lib/scanasm.exp (scan-assembler-dem): Likewise.
	(scan-assembler-dem-not): Likewise.
	* lib/scandump.exp (scan-dump-dem): Likewise.
	(scan-dump-dem-not): Likewise.

--- gcc/Makefile.in.ppp	2006-01-09 12:13:04.000000000 -0800
+++ gcc/Makefile.in	2006-01-10 23:01:42.000000000 -0800
@@ -3918,10 +3918,16 @@ $(TESTSUITEDIR)/site.exp: site.exp
 	-rm -f $@
 	sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp > $@
 
-$(lang_checks): check-% : $(TESTSUITEDIR)/site.exp
+$(lang_checks): check-% : site.exp
+	test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR)
+	test -d $(TESTSUITEDIR)/$* || mkdir $(TESTSUITEDIR)/$*
 	-(rootme=`${PWD_COMMAND}`; export rootme; \
 	srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
-	cd $(TESTSUITEDIR); \
+	cd $(TESTSUITEDIR)/$*; \
+	rm -f tmp-site.exp; \
+	sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)/$*|' \
+		< ../../site.exp > tmp-site.exp; \
+	$(SHELL) $(srcdir)/../move-if-change tmp-site.exp site.exp; \
 	EXPECT=${EXPECT} ; export EXPECT ; \
 	if [ -f $${rootme}/../expect/expect ] ; then  \
 	   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
--- gcc/testsuite/lib/g++.exp.ppp	2005-11-12 09:51:37.000000000 -0800
+++ gcc/testsuite/lib/g++.exp	2006-01-10 22:40:03.000000000 -0800
@@ -197,7 +197,7 @@ proc g++_init { args } {
 	    if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
 		set GXX_UNDER_TEST [transform c++]
 	    } else {
-		set GXX_UNDER_TEST [findfile $base_dir/../g++ "$base_dir/../g++ -B$base_dir/../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
+		set GXX_UNDER_TEST [findfile $base_dir/../../g++ "$base_dir/../../g++ -B$base_dir/../../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
 	    }
 	}
     }
--- gcc/testsuite/lib/gfortran.exp.ppp	2005-11-12 09:51:37.000000000 -0800
+++ gcc/testsuite/lib/gfortran.exp	2006-01-10 22:40:33.000000000 -0800
@@ -137,7 +137,7 @@ proc gfortran_init { args } {
 	    if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
 		set GFORTRAN_UNDER_TEST [transform gfortran]
 	    } else {
-		set GFORTRAN_UNDER_TEST [findfile $base_dir/../gfortran "$base_dir/../gfortran -B$base_dir/../" [findfile $base_dir/gfortran "$base_dir/gfortran -B$base_dir/" [transform gfortran]]]
+		set GFORTRAN_UNDER_TEST [findfile $base_dir/../../gfortran "$base_dir/../../gfortran -B$base_dir/../../" [findfile $base_dir/gfortran "$base_dir/gfortran -B$base_dir/" [transform gfortran]]]
 	    }
 	}
     }
--- gcc/testsuite/lib/obj-c++.exp.ppp	2005-11-12 09:51:37.000000000 -0800
+++ gcc/testsuite/lib/obj-c++.exp	2006-01-10 22:41:18.000000000 -0800
@@ -215,7 +215,7 @@ proc obj-c++_init { args } {
 	    if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
 		set OBJCXX_UNDER_TEST [transform c++]
 	    } else {
-		set OBJCXX_UNDER_TEST [findfile $base_dir/../g++ "$base_dir/../g++ -B$base_dir/../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
+		set OBJCXX_UNDER_TEST [findfile $base_dir/../../g++ "$base_dir/../../g++ -B$base_dir/../../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
 	    }
 	}
     }
--- gcc/testsuite/lib/scanasm.exp.ppp	2006-01-10 22:02:44.000000000 -0800
+++ gcc/testsuite/lib/scanasm.exp	2006-01-10 22:41:25.000000000 -0800
@@ -203,9 +203,9 @@ proc scan-assembler-dem { args } {
 
     # Find c++filt like we find g++ in g++.exp.
     if ![info exists cxxfilt]  {
-	set cxxfilt [findfile $base_dir/../../binutils/cxxfilt \
-		     $base_dir/../../binutils/cxxfilt \
-	             [findfile $base_dir/../c++filt $base_dir/../c++filt \
+	set cxxfilt [findfile $base_dir/../../../binutils/cxxfilt \
+		     $base_dir/../../../binutils/cxxfilt \
+	             [findfile $base_dir/../../c++filt $base_dir/../../c++filt \
 		      [findfile $base_dir/c++filt $base_dir/c++filt \
 		       [transform c++filt]]]]
 	verbose -log "c++filt is $cxxfilt"
@@ -249,9 +249,9 @@ proc scan-assembler-dem-not { args } {
 
     # Find c++filt like we find g++ in g++.exp.
     if ![info exists cxxfilt]  {
-	set cxxfilt [findfile $base_dir/../../binutils/cxxfilt \
-		     $base_dir/../../binutils/cxxfilt \
-		     [findfile $base_dir/../c++filt $base_dir/../c++filt \
+	set cxxfilt [findfile $base_dir/../../../binutils/cxxfilt \
+		     $base_dir/../../../binutils/cxxfilt \
+		     [findfile $base_dir/../../c++filt $base_dir/../../c++filt \
 		      [findfile $base_dir/c++filt $base_dir/c++filt \
 		       [transform c++filt]]]]
 	verbose -log "c++filt is $cxxfilt"
--- gcc/testsuite/lib/scandump.exp.ppp	2005-11-04 14:11:32.000000000 -0800
+++ gcc/testsuite/lib/scandump.exp	2006-01-10 22:41:32.000000000 -0800
@@ -149,9 +149,9 @@ proc scan-dump-dem { args } {
 
     # Find c++filt like we find g++ in g++.exp.
     if ![info exists cxxfilt]  {
-	set cxxfilt [findfile $base_dir/../../binutils/cxxfilt \
-		     $base_dir/../../binutils/cxxfilt \
-	             [findfile $base_dir/../c++filt $base_dir/../c++filt \
+	set cxxfilt [findfile $base_dir/../../../binutils/cxxfilt \
+		     $base_dir/../../../binutils/cxxfilt \
+	             [findfile $base_dir/../../c++filt $base_dir/../../c++filt \
 		      [findfile $base_dir/c++filt $base_dir/c++filt \
 		       [transform c++filt]]]]
 	verbose -log "c++filt is $cxxfilt"
@@ -193,9 +193,9 @@ proc scan-dump-dem-not { args } {
 
     # Find c++filt like we find g++ in g++.exp.
     if ![info exists cxxfilt]  {
-	set cxxfilt [findfile $base_dir/../../binutils/cxxfilt \
-		     $base_dir/../../binutils/cxxfilt \
-		     [findfile $base_dir/../c++filt $base_dir/../c++filt \
+	set cxxfilt [findfile $base_dir/../../../binutils/cxxfilt \
+		     $base_dir/../../../binutils/cxxfilt \
+		     [findfile $base_dir/../../c++filt $base_dir/../../c++filt \
 		      [findfile $base_dir/c++filt $base_dir/c++filt \
 		       [transform c++filt]]]]
 	verbose -log "c++filt is $cxxfilt"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]