fix multi-arch-exec for parallel mode
authorTom Tromey <tromey@redhat.com>
Wed, 13 Nov 2013 17:01:25 +0000 (10:01 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 13 Nov 2013 17:01:25 +0000 (10:01 -0700)
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
gdb/testsuite/gdb.multi/multi-arch-exec.c
gdb/testsuite/gdb.multi/multi-arch-exec.exp

index a123561d7ba6d411bcbbcb99f111eb4b8241a62b..5c9d5797571115f29db630d772275e6e98ac63a0 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2013-11-12  Doug Evans  <dje@google.com>
 
        * gdb.base/fileio.exp: Make $dir2 writable after the test is done
index b32782c836f001fc359184c777b794c518a84b18..8dcd23020a5f9c82af578e3cab5facc220eafd54 100644 (file)
@@ -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);
index bd777a79e4c2e827559b9a12d1ee57f1ae740c63..de84c36c70db64eabf1cbfde6064e10e3213e0c0 100644 (file)
@@ -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
 }
 
This page took 0.098953 seconds and 4 git commands to generate.