Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] avoid remote-host failures in gdb.linespec/linespec.exp
@ 2013-04-04  8:13 Sandra Loosemore
  2013-04-04 16:09 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Sandra Loosemore @ 2013-04-04  8:13 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

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.

[-- Attachment #2: linespec.patch --]
[-- Type: text/x-patch, Size: 1372 bytes --]

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\[)\]" \

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-04 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04  8:13 [patch] avoid remote-host failures in gdb.linespec/linespec.exp Sandra Loosemore
2013-04-04 16:09 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox