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]

[gccgo] Fix DejaGNU libgo testsuite


This patch from Vinu Rajashekhar fixes the DejaGNU testsuite he
introduced for RTEMS testing.  Committed to gccgo branch.

Ian

Index: libgo/testsuite/libgo.testmain/testmain.exp
===================================================================
--- libgo/testsuite/libgo.testmain/testmain.exp	(revision 163203)
+++ libgo/testsuite/libgo.testmain/testmain.exp	(working copy)
@@ -22,11 +22,15 @@ lappend ld_options "ldflags=-lgotesting"
 if [istarget "*-*-rtems*"] {
     global options
 
+    verbose -log "Executing on host: tar cf FilesystemImage -h -C \
+                         $tool_root_dir/$tool/${GOTEST_TMPDIR} ." 
     if [catch "exec tar cf FilesystemImage -h -C \
 			 $tool_root_dir/$tool/${GOTEST_TMPDIR} ." error] {
 	perror "Error during tar of local filesystem: $error"
 	exit 1
     }
+
+    verbose -log "Executing on host: ${RTEMS_BIN2C} FilesystemImage FilesystemImage"
     if [catch "exec ${RTEMS_BIN2C} FilesystemImage FilesystemImage" error] {
 	perror "Error when creating FilesystemImage source file: $error"
 	exit 1
@@ -50,5 +54,5 @@ if ![ string match "" $comp_output ] {
     verbose -log $comp_output
     exit 1
 }
-verbose -log $comp_output
+
 libgo_load "./a.exe" "" ""
Index: libgo/testsuite/lib/libgo.exp
===================================================================
--- libgo/testsuite/lib/libgo.exp	(revision 163203)
+++ libgo/testsuite/lib/libgo.exp	(working copy)
@@ -14,6 +14,13 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
+if {$gccdir != ""} {
+    set gccdir [file dirname $gccdir]
+}
+set GO_UNDER_TEST "$gccdir/gccgo -B$gccdir/"
+set TESTING_IN_BUILD_TREE 1
+
 proc go_maybe_build_wrapper { args } {
     libgo_maybe_build_wrapper $args
 }
@@ -34,8 +41,6 @@ load_gcc_lib wrapper.exp
 load_gcc_lib gcc-defs.exp
 load_gcc_lib go.exp
 
-set TESTING_IN_BUILD_TREE 1
-
 proc libgo_init { args } {
     go_init $args
 }
Index: libgo/testsuite/Makefile.am
===================================================================
--- libgo/testsuite/Makefile.am	(revision 163203)
+++ libgo/testsuite/Makefile.am	(working copy)
@@ -11,6 +11,11 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja
 	       echo $(top_srcdir)/../dejagnu/runtest ; \
 	    else echo runtest; fi`
 
-AM_RUNTESTFLAGS =
+# When running the tests we set GCC_EXEC_PREFIX to the install tree so that
+# files that have already been installed there will be found.  The -B option
+# overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files
+# from the install tree.
+
+AM_RUNTESTFLAGS = "TEST_GCC_EXEC_PREFIX=$(libdir)/gcc"
 
 CLEANFILES = *.log *.sum

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