This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[commit] Remove paths from test names


We run a nightly tester that compares dejagnu logs.  Every night it
tells me it removed a bunch of XML failures and added a new bunch
(I haven't looked why they're failing yet).  That's because the test
names include the working directory, which changes nightly.  Fixed,
as below.  Tested on x86_64-linux and committed.

I think I went through and did this a while ago, but then added a
whole new batch of problems myself... I'll try to remember this time!

-- 
Daniel Jacobowitz
CodeSourcery

2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.base/maint.exp: Remove full paths from test names.
	* gdb.base/prelink.exp, gdb.cp/cp-relocate.exp,
	gdb.xml/tdesc-errors.exp, gdb.xml/tdesc-xinclude.exp: Likewise.

Index: gdb.base/maint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/maint.exp,v
retrieving revision 1.29
diff -u -p -r1.29 maint.exp
--- gdb.base/maint.exp	9 Jan 2007 17:59:11 -0000	1.29
+++ gdb.base/maint.exp	27 Feb 2007 13:46:38 -0000
@@ -329,7 +329,7 @@ gdb_expect  {
 
 # Check that maint print msymbols allows relative pathnames
 set mydir [pwd]
-gdb_test "cd ${objdir}" "Working directory [string_to_regexp ${objdir}]\..*"
+gdb_test "cd ${objdir}" "Working directory [string_to_regexp ${objdir}]\..*" "cd to objdir"
 gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}" "maint print msymbols" {
     -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
     	gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
@@ -362,7 +362,7 @@ gdb_test_multiple "maint print msymbols 
 	fail "(timeout) maint print msymbols"
     }
 }
-gdb_test "cd ${mydir}" "Working directory [string_to_regexp ${mydir}]\..*"
+gdb_test "cd ${mydir}" "Working directory [string_to_regexp ${mydir}]\..*" "cd to mydir"
 
 send_gdb "maint print symbols\n"
 gdb_expect  {
Index: gdb.base/prelink.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/prelink.exp,v
retrieving revision 1.4
diff -u -p -r1.4 prelink.exp
--- gdb.base/prelink.exp	9 Jan 2007 17:59:11 -0000	1.4
+++ gdb.base/prelink.exp	27 Feb 2007 13:46:38 -0000
@@ -90,7 +90,7 @@ if { $found == 0  } {
 }
 
 if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
-    untested "${libfile} was not prelinked, maybe system libraries are not prelinked?"
+    untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?"
     return 0
 }
 catch "system \"prelink -qNR ${libfile}\""
Index: gdb.cp/cp-relocate.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/cp-relocate.exp,v
retrieving revision 1.1
diff -u -p -r1.1 cp-relocate.exp
--- gdb.cp/cp-relocate.exp	26 Feb 2007 20:04:38 -0000	1.1
+++ gdb.cp/cp-relocate.exp	27 Feb 2007 13:46:38 -0000
@@ -126,7 +126,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 
 gdb_test "add-symbol-file ${binfile} 0 -s ${func1_sec} 0x40000 -s ${func2_sec} 0x80000" \
 	"Reading symbols from .*${testfile}\\.o\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
-	"add-symbol-file ${binfile}" \
+	"add-symbol-file ${testfile}.o" \
 	"add symbol table from file \".*${testfile}\\.o\" at.*\\(y or n\\) " \
 	"y"
 
Index: gdb.xml/tdesc-errors.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.xml/tdesc-errors.exp,v
retrieving revision 1.1
diff -u -p -r1.1 tdesc-errors.exp
--- gdb.xml/tdesc-errors.exp	23 Jan 2007 17:11:55 -0000	1.1
+++ gdb.xml/tdesc-errors.exp	27 Feb 2007 13:46:39 -0000
@@ -28,7 +28,7 @@ proc set_bad_arch { srcfile errmsg } {
 
     # Anchor the test output, so that error messages are detected.
     set cmd "set tdesc filename $srcdir/$subdir/$srcfile"
-    set msg $cmd
+    set msg "set tdesc filename $subdir/$srcfile"
     set cmd_regex [string_to_regexp $cmd]
     gdb_test_multiple $cmd $msg {
 	-re "^$cmd_regex\r\n$errmsg$gdb_prompt $" {
Index: gdb.xml/tdesc-xinclude.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.xml/tdesc-xinclude.exp,v
retrieving revision 1.1
diff -u -p -r1.1 tdesc-xinclude.exp
--- gdb.xml/tdesc-xinclude.exp	7 Feb 2007 22:48:06 -0000	1.1
+++ gdb.xml/tdesc-xinclude.exp	27 Feb 2007 13:46:39 -0000
@@ -28,7 +28,7 @@ proc set_arch { srcfile errmsg } {
 
     # Anchor the test output, so that error messages are detected.
     set cmd "set tdesc filename $srcdir/$subdir/$srcfile"
-    set msg $cmd
+    set msg "set tdesc filename $subdir/$srcfile"
     set cmd_regex [string_to_regexp $cmd]
     gdb_test_multiple $cmd $msg {
 	-re "^$cmd_regex\r\n$errmsg$gdb_prompt $" {


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