public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] binutils/testsuite: skip gentestdlls related tests if missing
@ 2022-09-26 14:11 Clément Chigot
  2022-09-26 15:18 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Chigot @ 2022-09-26 14:11 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-26 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 14:11 [PATCH] binutils/testsuite: skip gentestdlls related tests if missing Clément Chigot
2022-09-26 15:18 ` Nick Clifton

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).