This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]