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] binutils/testsuite: skip gentestdlls related tests if missing
Date: Mon, 26 Sep 2022 16:11:00 +0200	[thread overview]
Message-ID: <20220926141100.163950-1-chigot@adacore.com> (raw)

When launching the testsuite through runtest outside the build tree,
gentestdlls might not be available, this binary being created by make
check.
Simply untested the related tests instead of crashing.

binutils/ChangeLog:

	* testsuite/binutils-all/objdump.exp: Skip dotnet tests if
	gentestdlls is not available.
---
 binutils/testsuite/binutils-all/objdump.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index fb099425e34..436fc46d1a8 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -787,6 +787,12 @@ proc test_objdump_dotnet_assemblies {} {
 
     set test "dotnet-assemblies"
 
+    # If gentestdlls isn't available, skip instead of crashing below.
+    if ![file exists $base_dir/testsuite/gentestdlls] {
+	untested $test
+	return
+    }
+
     set got [binutils_run "$base_dir/testsuite/gentestdlls" "tmpdir pei-i386 pei-x86-64"]
     set want "wrote linux-pei-x86-64.dll"
     # The test program is hardcoded to generate valid dlls on any target
-- 
2.25.1


             reply	other threads:[~2022-09-26 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 14:11 Clément Chigot [this message]
2022-09-26 15:18 ` 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=20220926141100.163950-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).