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 1/4] more uses of standard_output_file
Date: Wed, 17 Jul 2013 14:59:00 -0000	[thread overview]
Message-ID: <1374073124-23602-2-git-send-email-tromey@redhat.com> (raw)
In-Reply-To: <1374073124-23602-1-git-send-email-tromey@redhat.com>

A few spots in lib make output files, either in "." or in
$objdir/$subdir.

This patch changes these spots to use standard_output_file.
This help the parallelization project.

	* lib/gdb.exp (build_id_debug_filename_get): Use
	standard_output_file.
	* lib/prelink-support.exp (section_get)
	(build_executable_own_libs): Use standard_output_file.
---
 gdb/testsuite/lib/gdb.exp             | 2 +-
 gdb/testsuite/lib/prelink-support.exp | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 376aacc..1ca4354 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3873,7 +3873,7 @@ proc gdb_skip_xml_test { } {
 # converted to the form: .build-id/ab/cdef1234...89.debug
 # Return "" if no build-id found.
 proc build_id_debug_filename_get { exec } {
-    set tmp "${exec}-tmp"
+    set tmp [standard_output_file "${exec}-tmp"]
     set objcopy_program [transform objcopy]
 
     set result [catch "exec $objcopy_program -j .note.gnu.build-id -O binary $exec $tmp" output]
diff --git a/gdb/testsuite/lib/prelink-support.exp b/gdb/testsuite/lib/prelink-support.exp
index ef99783..f7d813f 100644
--- a/gdb/testsuite/lib/prelink-support.exp
+++ b/gdb/testsuite/lib/prelink-support.exp
@@ -18,9 +18,8 @@
 # for sections ".interp" or ".gnu_debuglink".
 
 proc section_get {exec section} {
-    global objdir
     global subdir
-    set tmp "${objdir}/${subdir}/section_get.tmp"
+    set tmp [standard_output_file section_get.tmp]
     set objcopy_program [transform objcopy]
 
     set command "exec $objcopy_program -O binary --set-section-flags $section=A --change-section-address $section=0 -j $section $exec $tmp"
@@ -117,12 +116,12 @@ proc file_copy {src dest} {
 # with -Wl,-soname,NAME.so are not copied.
 
 proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
-    global objdir subdir
+    global subdir
 
     if {[build_executable $testname $executable $sources $options] == -1} {
 	return ""
     }
-    set binfile ${objdir}/${subdir}/${executable}
+    set binfile [standard_output_file ${executable}]
 
     set command "ldd $binfile"
     set test "ldd $executable"
-- 
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 3/4] add standard_temp_file Tom Tromey
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 ` Tom Tromey [this message]
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-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-2-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