aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/foll-exec.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-10-18 14:00:44 -0600
committerTom Tromey <tromey@redhat.com>2013-11-04 11:02:10 -0700
commit3fef966c5ff1b0f6031e31117547e901fedb08c4 (patch)
treef25bac6597187d8df7b37ba23794f54026720cc5 /gdb/testsuite/gdb.base/foll-exec.exp
parent24890efdabbd9d827cdd2088b022f070da04b14f (diff)
downloadfsf-binutils-gdb-3fef966c5ff1b0f6031e31117547e901fedb08c4.zip
fsf-binutils-gdb-3fef966c5ff1b0f6031e31117547e901fedb08c4.tar.gz
fsf-binutils-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.base/foll-exec.exp')
-rw-r--r--gdb/testsuite/gdb.base/foll-exec.exp8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp
index 9456f42..135cad6 100644
--- a/gdb/testsuite/gdb.base/foll-exec.exp
+++ b/gdb/testsuite/gdb.base/foll-exec.exp
@@ -29,13 +29,17 @@ set testfile2 "execd-prog"
set srcfile2 ${testfile2}.c
set binfile2 [standard_output_file ${testfile2}]
+set compile_options debug
+set dirname [relative_filename [pwd] [file dirname $binfile]]
+lappend compile_options "additional_flags=-DBASEDIR=\"$dirname\""
+
# build the first test case
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $compile_options] != "" } {
untested foll-exec.exp
return -1
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } {
untested foll-exec.exp
return -1
}