This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 04/17] fix up gdb.gdb


This fixes the gdb.gdb tests to be parallel-safe, by ensuring that the
new "xgdb" file ends up in the standard output directory during the
tests.

~ChangeLog~
2013-10-24  Tom Tromey  <tromey@redhat.com>

	* gdb.gdb/selftest.exp: Use standard_output_file.
	* lib/selftest-support.exp (do_self_tests): Use
	standard_output_file.
---
 gdb/testsuite/ChangeLog                |  6 ++++++
 gdb/testsuite/gdb.gdb/selftest.exp     | 10 ++++++++--
 gdb/testsuite/lib/selftest-support.exp | 10 ++++++++--
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index d700715..3f934cf 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -479,11 +479,17 @@ proc test_with_self { executable } {
 
 set GDB_FULLPATH [find_gdb $GDB]
 
+if {[is_remote host]} {
+    set xgdb x$tool
+} else {
+    set xgdb [standard_output_file x$tool]
+}
+
 # Remove any old copy lying around.
-remote_file host delete x$tool
+remote_file host delete $xgdb
 
 gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
+set file [remote_download host $GDB_FULLPATH $xgdb]
 set result [test_with_self $file]
 gdb_exit
 catch "remote_file host delete $file"
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index fc4bccc..98a83aa 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -129,11 +129,17 @@ proc do_self_tests {function body} {
 
     set GDB_FULLPATH [find_gdb $GDB]
 
+    if {[is_remote host]} {
+	set xgdb x$tool
+    } else {
+	set xgdb [standard_output_file x$tool]
+    }
+
     # Remove any old copy lying around.
-    remote_file host delete x$tool
+    remote_file host delete $xgdb
 
     gdb_start
-    set file [remote_download host $GDB_FULLPATH x$tool]
+    set file [remote_download host $GDB_FULLPATH $xgdb]
 
     set result [selftest_setup $file $function]
     if {$result == 0} then {
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]