This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Skip the test if the cross binary fails to run.
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Mon, 30 Sep 2002 14:08:13 -0700
- Subject: PATCH: Skip the test if the cross binary fails to run.
If you have a cross compiler in PATH, but no target board, "make check"
will fail in binutils when it tries to run the cross binary on the build
machine. This patch skips the test. It only catches Linux's error
message. Someone has to add the support for other OSes.
H.J.
----
2002-09-30 H.J. Lu <hjl@gnu.org>
* binutils-all/objcopy.exp (copy_setup): Skip the test if the
cross binary fails to run.
--- binutils/testsuite/binutils-all/objcopy.exp.mips Sun Aug 25 09:04:25 2002
+++ binutils/testsuite/binutils-all/objcopy.exp Mon Sep 30 14:05:23 2002
@@ -453,8 +453,15 @@ proc copy_setup { } {
set status [lindex $result 0];
if { $status != "pass" } {
- perror "unresolved setup, status = $status"
- return 3
+ set msg [lindex $result 1];
+ if { ![isnative] \
+ && ![is_remote host] \
+ && [regexp "cannot execute binary file" $msg] } then {
+ return 2
+ } else {
+ perror "unresolved setup, status = $status"
+ return 3
+ }
}
return 0