This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/4] gdb.exp: Support absolute path name args in 'prepare_for_testing' etc.
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Fri, 07 Mar 2014 18:13:05 +0100
- Subject: [PATCH 1/4] gdb.exp: Support absolute path name args in 'prepare_for_testing' etc.
- Authentication-results: sourceware.org; auth=none
- References: <87siqudjdn dot fsf at br87z6lw dot de dot ibm dot com>
Test cases that produce source files in the build directory have not
been able to use prepare_for_testing and friends. This was because
build_executable_from_specs unconditionally prepended the source
directory path name to its arguments.
gdb/testsuite/
* lib/gdb.exp (build_executable_from_specs): Don't prepend source
directory to absolute path name arguments.
---
gdb/testsuite/lib/gdb.exp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 2d04a8c..39b9291 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4267,7 +4267,10 @@ proc build_executable_from_specs {testname executable options args} {
set objects {}
set i 0
foreach {s local_options} $args {
- if { [gdb_compile "${srcdir}/${subdir}/${s}" "${binfile}${i}.o" object $local_options] != "" } {
+ if { ! [regexp "^/" "$s"] } then {
+ set s "$srcdir/$subdir/$s"
+ }
+ if { [gdb_compile "${s}" "${binfile}${i}.o" object $local_options] != "" } {
untested $testname
return -1
}
--
1.8.4.2