From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9061 invoked by alias); 17 Jul 2013 14:58:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8958 invoked by uid 89); 17 Jul 2013 14:58:57 -0000 X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_05,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS,TW_BJ autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 14:58:56 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6HEwn7p019394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Jul 2013 10:58:49 -0400 Received: from barimba.redhat.com (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6HEwl57012037; Wed, 17 Jul 2013 10:58:49 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 3/4] add standard_temp_file Date: Wed, 17 Jul 2013 14:59:00 -0000 Message-Id: <1374073124-23602-4-git-send-email-tromey@redhat.com> In-Reply-To: <1374073124-23602-1-git-send-email-tromey@redhat.com> References: <1374073124-23602-1-git-send-email-tromey@redhat.com> X-SW-Source: 2013-07/txt/msg00385.txt.bz2 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