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]

[patch] avoid remote-host failures in gdb.linespec/linespec.exp


This patch gets rid of a couple test fails in linespec.exp that we've observed from remote-host i686-mingw32 testing of Canadian cross toolchains for multiple targets. As I observed in my notes on a previous patch

http://sourceware.org/ml/gdb-patches/2013-04/msg00053.html

in this configuration the test harness copies the source files to the working directory on the remote host and compiles them there, without a directory prefix. So, tests that depend on a directory prefix being present (in this case, to disambiguate files that otherwise have the same name) can't be expected to work.

OK to commit?

-Sandra


2013-04-03  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/

	* gdb.linespec/linespec.exp (test_class): Make dir/file:line tests
	conditional for non-remote hosts only.
Index: gdb/testsuite/gdb.linespec/linespec.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.linespec/linespec.exp,v
retrieving revision 1.6
diff -u -p -r1.6 linespec.exp
--- gdb/testsuite/gdb.linespec/linespec.exp	1 Jan 2013 06:41:24 -0000	1.6
+++ gdb/testsuite/gdb.linespec/linespec.exp	3 Apr 2013 23:11:38 -0000
@@ -43,13 +43,19 @@ if {$l1 != $l2} {
     error "somebody incompatibly modified the source files needed by linespec.exp"
 }
 
-gdb_test "break one/thefile.cc:$l1" \
-    "Breakpoint $decimal at $hex: file .*thefile.cc, line $l1." \
-    "single-location break using dir/file:line"
-
-gdb_test "clear one/thefile.cc:$l1" \
-    "Deleted breakpoint $decimal *" \
-    "clear breakpoint using dir/file:line"
+# Copying files to a remote host loses the directory prefix during
+# compilation.
+if { [is_remote host] } {
+    untested "breakpoints using dir/file:line"
+} else {
+    gdb_test "break one/thefile.cc:$l1" \
+        "Breakpoint $decimal at $hex: file .*thefile.cc, line $l1." \
+        "single-location break using dir/file:line"
+
+    gdb_test "clear one/thefile.cc:$l1" \
+        "Deleted breakpoint $decimal *" \
+        "clear breakpoint using dir/file:line"
+}
 
 gdb_test "break thefile.cc:$l1" \
     "Breakpoint $decimal at $hex: thefile.cc:$l1. \[(\]2 locations\[)\]" \

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