From: Clément Chigot Date: Fri, 16 Sep 2022 08:50:34 +0000 (+0200) Subject: binutils/testsuite: skip gentestdlls related tests if missing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9d92351722884fda8914021b25e5d5a6cc1a181;p=binutils-gdb.git binutils/testsuite: skip gentestdlls related tests if missing 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. --- 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