Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH 3/4] add standard_temp_file
Date: Wed, 17 Jul 2013 14:59:00 -0000	[thread overview]
Message-ID: <1374073124-23602-4-git-send-email-tromey@redhat.com> (raw)
In-Reply-To: <1374073124-23602-1-git-send-email-tromey@redhat.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


  parent reply	other threads:[~2013-07-17 14:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 14:58 [PATCH 0/4] introduce test suite "parallel" mode Tom Tromey
2013-07-17 14:59 ` [PATCH 4/4] add caching procs to test suite Tom Tromey
2013-08-01 17:10   ` Pedro Alves
2013-08-01 17:58     ` Tom Tromey
2013-07-17 14:59 ` Tom Tromey [this message]
2013-07-17 14:59 ` [PATCH 2/4] introduce parallel mode Tom Tromey
2013-07-18 12:42   ` Yao Qi
2013-07-18 13:36     ` Tom Tromey
2013-07-18 22:22       ` Yao Qi
2013-08-01 19:45         ` Tom Tromey
2013-08-01 20:58           ` Tom Tromey
2013-08-02  6:23           ` Yao Qi
2013-08-02  8:41           ` Pedro Alves
2013-08-02 15:02             ` Tom Tromey
2013-08-01 16:56   ` Pedro Alves
2013-07-17 14:59 ` [PATCH 1/4] more uses of standard_output_file Tom Tromey
2013-08-01 17:14 ` [PATCH 0/4] introduce test suite "parallel" mode Pedro Alves
2013-08-01 19:22   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374073124-23602-4-git-send-email-tromey@redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox