V3 testsuite problem on branch

John David Anglin dave@hiauly1.hia.nrc.ca
Wed May 16 16:31:00 GMT 2001


> If you are using dejagnu-1.4.1 then I know the answer - there is a line wrap
> problem in ${prefix}/share/dejagnu/target.exp 
> 
> See http://mail.gnu.org/pipermail/dejagnu/2001-May/000031.html , 

The report was for 1.3.1.  Your tip stimulated me to compare 1.3.1 to 1.4.1.
After making the enclosed patch below, 1.3.1 now runs similarly to 1.4.1
with respect to the v3 testsuite.

There is another deja issue that still appears unfixed in 1.4.1.  This is
that ldflags should appear before the library list.  The current order results
in linking with installed rather than build libraries, at least under hpux.

Dave

2001-05-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* target.exp (default_target_compile): Place ldflags before libraries.

--- target.exp.orig	Tue Jul  6 14:10:19 1999
+++ target.exp	Fri Jul 16 15:50:23 1999
@@ -515,6 +515,8 @@
     }
 
     if { $type == "executable" } {
+	append add_flags " $ldflags"
+
 	foreach x $libs {
 	    if [file exists $x] {
 		append source " $x"
@@ -522,7 +524,6 @@
 		append add_flags " $x";
 	    }
 	}
-	append add_flags " $ldflags"
 
 	if [board_info $dest exists libs] {
 	    append add_flags " [board_info $dest libs]"
--------------------------------------------------------------------------------
2001-05-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* dg.exp (dg-trim-dirname): New for framework version 1.3.1.
	(dg-test): Use it.

--- dg.exp.orig	Thu Apr 12 10:44:10 2001
+++ dg.exp	Wed May 16 19:11:19 2001
@@ -586,6 +586,19 @@
     }
 }
 
+# dg-trim-dirname -- rip DIR_NAME out of FILE_NAME
+#
+# Syntax: dg-trim-dirname dir_name file_name
+# We need to go through this contorsion in order to properly support
+# directory-names which might have embedded regexp special characters.
+
+proc dg-trim-dirname { dir_name file_name } {
+    set special_character "\[\?\+\-\.\(\)\$\|\]"
+    regsub -all $special_character $dir_name "\\\\&" dir_name
+    regsub "^$dir_name/?" $file_name "" file_name
+    return $file_name
+}
+
 # dg-test -- runs a new style DejaGnu test
 #
 # Syntax: dg-test [-keep-output] prog tool_flags default_extra_tool_flags
@@ -631,7 +644,7 @@
 
     set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*]*"
 
-    regsub "^$srcdir/?" $prog "" name
+    set name [dg-trim-dirname $srcdir $prog]
     # If we couldn't rip $srcdir out of `prog' then just do the best we can.
     # The point is to reduce the unnecessary noise in the logs.  Don't strip
     # out too much because different testcases with the same name can confuse



More information about the Libstdc++ mailing list