public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: binutils@sourceware.org
Cc: "Clément Chigot" <chigot@adacore.com>
Subject: [PATCH 1/2] ld/testsuite: skip bootstrap.exp when OFILES are missing
Date: Thu, 15 Sep 2022 10:50:19 +0200	[thread overview]
Message-ID: <20220915085020.413110-1-chigot@adacore.com> (raw)

OFILES are normally provided through an environment variable set by
Makefiles. However, when launching the testsuite directly through
runtest outside the build tree, it can be hard to retrieve them.
Thus, they can be missing.
Instead of letting tcl raise an error when trying to access this
OFILES variable, skip bootstrap.exp if it doesn't exist.

ld/ChangeLog:

	* testsuite/ld-bootstrap/bootstrap.exp: Skip if OFILES is
	missing
---
 ld/testsuite/ld-bootstrap/bootstrap.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index f6d38af5d40..52a91fc554e 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -29,6 +29,12 @@ if ![isnative] {
     return
 }
 
+# Skip if OFILES aren't provided, it can happen when lauching
+# the testsuites outside the build directory.
+if {![info exists OFILES]} {
+    return
+}
+
 # Skip for -fprofile-generate=.
 catch "exec $nm $plug_opt $OFILES" exec_output
 send_log "foo: $exec_output"
-- 
2.25.1


             reply	other threads:[~2022-09-15  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  8:50 Clément Chigot [this message]
2022-09-15  8:50 ` [PATCH 2/2] ld/testsuite: allow to force another directory for gcc linker Clément Chigot
2022-09-20 16:32   ` Nick Clifton
2022-09-20 16:31 ` [PATCH 1/2] ld/testsuite: skip bootstrap.exp when OFILES are missing Nick Clifton

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=20220915085020.413110-1-chigot@adacore.com \
    --to=chigot@adacore.com \
    --cc=binutils@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).