public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] fix multi-arch-exec for parallel mode
@ 2013-11-13 17:22 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2013-11-13 17:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

I noticed today that multi-arch-exec.exp was failing in parallel mode.

The bug is that multi-arch-exec.c assumes the non-parallel directory
layout.

This patch fixes the problem using the same "BASEDIR" approach used in
other tests.

Tested both ways on x86-64 Fedora 18.
I'm checking this in.

2013-11-13  Tom Tromey  <tromey@redhat.com>

	* gdb.multi/multi-arch-exec.exp: Define BASEDIR when compiling.
	* gdb.multi/multi-arch-exec.c (main): Use BASEDIR.
---
 gdb/testsuite/ChangeLog                     | 5 +++++
 gdb/testsuite/gdb.multi/multi-arch-exec.c   | 4 ++--
 gdb/testsuite/gdb.multi/multi-arch-exec.exp | 5 ++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.c b/gdb/testsuite/gdb.multi/multi-arch-exec.c
index b32782c..8dcd230 100644
--- a/gdb/testsuite/gdb.multi/multi-arch-exec.c
+++ b/gdb/testsuite/gdb.multi/multi-arch-exec.c
@@ -21,8 +21,8 @@
 int
 main ()
 {
-  execl ("gdb.multi/multi-arch-exec-hello",
-         "gdb.multi/multi-arch-exec-hello",
+  execl (BASEDIR "/multi-arch-exec-hello",
+         BASEDIR "/multi-arch-exec-hello",
          (char *) NULL);
   perror ("execl failed");
   exit (1);
diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
index bd777a7..de84c36 100644
--- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp
+++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
@@ -49,8 +49,11 @@ if [istarget "s390*-*-*"] {
     set march2 "-m32"
 }
 
+set dirname [relative_filename [pwd] [file dirname $binfile2]]
 if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \
-	  [list debug nowarnings additional_flags=${march1}]] } {
+	  [list debug nowarnings \
+	       additional_flags=${march1} \
+	       additional_flags=-DBASEDIR=\"$dirname\"]] } {
     return -1
 }
 
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-13 17:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 17:22 [PATCH] fix multi-arch-exec for parallel mode Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).