diff options
author | Tom Tromey <tromey@redhat.com> | 2013-10-18 14:00:44 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-11-04 11:02:10 -0700 |
commit | 3fef966c5ff1b0f6031e31117547e901fedb08c4 (patch) | |
tree | f25bac6597187d8df7b37ba23794f54026720cc5 /gdb/testsuite/gdb.multi | |
parent | 24890efdabbd9d827cdd2088b022f070da04b14f (diff) | |
download | gdb-3fef966c5ff1b0f6031e31117547e901fedb08c4.zip gdb-3fef966c5ff1b0f6031e31117547e901fedb08c4.tar.gz gdb-3fef966c5ff1b0f6031e31117547e901fedb08c4.tar.bz2 |
fix some "exec" tests
A few tests run an inferior that execs some other program. The name
of this exec'd program is compiled in. These tests assume the current
test suite directory layout, but fail in parallel mode.
This patch fixes these tests by letting the .exp files pass in the
directory names at compile time.
2013-11-04 Tom Tromey <tromey@redhat.com>
* gdb.base/foll-exec.c (main): Use BASEDIR.
* gdb.base/foll-exec.exp: Define BASEDIR during compilation.
* gdb.base/foll-vfork.c (main): Use BASEDIR.
* gdb.base/foll-vfork.exp: Define BASEDIR during compilation.
* gdb.multi/bkpt-multi-exec.c (main): Use BASEDIR.
* gdb.multi/bkpt-multi-exec.exp: Define BASEDIR during compilation.
Diffstat (limited to 'gdb/testsuite/gdb.multi')
-rw-r--r-- | gdb/testsuite/gdb.multi/bkpt-multi-exec.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.multi/bkpt-multi-exec.exp | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.c b/gdb/testsuite/gdb.multi/bkpt-multi-exec.c index 672d63b..94c9668 100644 --- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.c +++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.c @@ -7,7 +7,7 @@ int main (void) { printf ("foll-exec is about to execl(crashme)...\n"); - execl ("gdb.multi/crashme", - "gdb.multi/crashme", + execl (BASEDIR "/crashme", + BASEDIR "/crashme", (char *)0); } diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp index cf74701..c4eee8f 100644 --- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp +++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.exp @@ -33,11 +33,15 @@ set exec2 "crashme" set srcfile2 ${exec2}.c set binfile2 [standard_output_file ${exec2}] -if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnings}] == -1 } { +set compile_options {debug nowarnings} +set dirname [relative_filename [pwd] [file dirname $binfile1]] +lappend compile_options "additional_flags=-DBASEDIR=\"$dirname\"" + +if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" $compile_options] == -1 } { return -1 } -if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnings}] == -1 } { +if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" $compile_options] == -1 } { return -1 } |