public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Fix new libdep test so that if the plugin cannot be located the test fails gracefully.
@ 2024-06-27 10:53 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2024-06-27 10:53 UTC (permalink / raw)
  To: binutils-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9653254a75d9f7276635ab768261b05507d75df6

commit 9653254a75d9f7276635ab768261b05507d75df6
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jun 27 11:52:33 2024 +0100

    Fix new libdep test so that if the plugin cannot be located the test fails gracefully.

Diff:
---
 ld/testsuite/ld-plugin/libdep.exp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ld/testsuite/ld-plugin/libdep.exp b/ld/testsuite/ld-plugin/libdep.exp
index e0afcfc342a..6e56b6bab18 100644
--- a/ld/testsuite/ld-plugin/libdep.exp
+++ b/ld/testsuite/ld-plugin/libdep.exp
@@ -87,20 +87,21 @@ proc run_test { } {
     set lt_objdir [regsub "objdir=" "$lt_objdir" ""]
 
     if { [ file exists "$base_dir/$lt_objdir/libdep.so" ] } {
-	set libdep "$base_dir/$lt_objdir/libdep.so"
+	set libdep_plugin "$base_dir/$lt_objdir/libdep.so"
     } else {
 	# FIXME: Check in the system bfd-plugin directory ?
 	fail "$testname - could not locate libdep plugin"
+	return
     }
 
-    verbose "Full plugin path: $libdep" 1
+    verbose "Full plugin path: $libdep_plugin" 1
     
     # Link the main object file with the liba.a library.
     # Use the libdep plugin to read the __.LIBDEP element in the liba.a library
     # and so bring in the libdep-b.o object file from the libc.a library.
     # Failure to locate the libc.a library, or loading the wrong libc.a library
     # will result in an unresolved reference error.
-    set exec_output [run_host_cmd "$ld" "-plugin $libdep -o libdep.exe libdep-main.o -L libdep-a -la -e 0"]
+    set exec_output [run_host_cmd "$ld" "-plugin $libdep_plugin -o libdep.exe libdep-main.o -L libdep-a -la -e 0"]
     set exec_output [prune_warnings $exec_output]
 
     set expected_output "got deps for library libdep-a/liba.a: -Llibdep-b -lc"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-27 10:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-27 10:53 [binutils-gdb] Fix new libdep test so that if the plugin cannot be located the test fails gracefully 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).