aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp13
2 files changed, 11 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5c663ef..fa4eecf 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2016-02-16 Simon Marchi <simon.marchi@ericsson.com>
+ * lib/gdb.exp (standard_temp_file): Return a path specific to
+ the runtest invocation.
+
+2016-02-16 Simon Marchi <simon.marchi@ericsson.com>
+
* gdb.trace/save-trace.exp: Change relative path to be in the
standard output directory.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1fb05c4..a77bce4 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4339,13 +4339,12 @@ proc standard_output_file {basename} {
# Return the name of a file in our standard temporary directory.
proc standard_temp_file {basename} {
- global objdir GDB_PARALLEL
-
- if {[info exists GDB_PARALLEL]} {
- return [make_gdb_parallel_path temp $basename]
- } else {
- return $basename
- }
+ # Since a particular runtest invocation is only executing a single test
+ # file at any given time, we can use the runtest pid to build the
+ # path of the temp directory.
+ set dir [make_gdb_parallel_path temp [pid]]
+ file mkdir $dir
+ return [file join $dir $basename]
}
# Set 'testfile', 'srcfile', and 'binfile'.