PATCH: Skip the test if the cross binary fails to run.

H. J. Lu hjl@lucon.org
Mon Sep 30 16:22:00 GMT 2002


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



More information about the Binutils mailing list