From: Cl?ment Chigot <helflym@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] ld/testsuite: skip tests related to -shared when disabled
Date: Mon, 7 Nov 2022 12:16:54 +0000 (GMT) [thread overview]
Message-ID: <20221107121654.DD9EA3858D28@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8bfb6941c358ee2da8320125644c59bf90842f6b
commit 8bfb6941c358ee2da8320125644c59bf90842f6b
Author: Clément Chigot <chigot@adacore.com>
Date: Fri Nov 4 16:52:05 2022 +0100
ld/testsuite: skip tests related to -shared when disabled
Call the helper function "check_shared_lib_support" to ensure -shared
is enabled before launching ld-shared, ld-elfweak and ld-elfvers.
This allows to catch custom targets explicitly disabling it.
ld/ChangeLog:
* testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support.
* testsuite/ld-elfweak/elfweak.exp: Likewise.
* testsuite/ld-shared/shared.exp: Likewise.
Diff:
---
ld/testsuite/ld-elfvers/vers.exp | 5 +++++
ld/testsuite/ld-elfweak/elfweak.exp | 5 +++++
ld/testsuite/ld-shared/shared.exp | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 3e2ba2aac07..2e44d4a410f 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -27,6 +27,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp
index 99188654df1..69826803a17 100644
--- a/ld/testsuite/ld-elfweak/elfweak.exp
+++ b/ld/testsuite/ld-elfweak/elfweak.exp
@@ -27,6 +27,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index 229fddbd436..94e03fceff9 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -30,6 +30,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
if { ![istarget hppa*64*-*-hpux*] \
reply other threads:[~2022-11-07 12:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221107121654.DD9EA3858D28@sourceware.org \
--to=helflym@sourceware.org \
--cc=bfd-cvs@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).