This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/4] add standard_temp_file
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Wed, 17 Jul 2013 08:58:43 -0600
- Subject: [PATCH 3/4] add standard_temp_file
- References: <1374073124-23602-1-git-send-email-tromey at redhat dot com>
This adds a new helper proc, standard_temp_file. This proc takes a
file name and returns a possibly-qualified form. This lets us make
parallel runs use a directory other than ".", which helps the inotify
mode.
* lib/gdb.exp (standard_temp_file): New proc.
---
gdb/testsuite/lib/gdb.exp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b12f466..a75ce35 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3396,6 +3396,18 @@ 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 [file join $objdir temp $basename]
+ } else {
+ return $basename
+ }
+}
+
# Set 'testfile', 'srcfile', and 'binfile'.
#
# ARGS is a list of source file specifications.
--
1.8.1.4