Enable simple objcopy test for cross builds
Alan Modra
amodra@bigpond.net.au
Wed May 2 10:37:00 GMT 2007
This enables an objcopy test when building a cross binutils. I've
also fixed the return status of the tests so that runtest doesn't
return an error when we can compile but not run executables.
Previously, when building cross binutils you'd pass the binutils
tests if you didn't have a full cross-toolchain installed on your
build machine, but after installing the complete toolchain the objcopy
tests would fail.
* binutils-all/objcopy.exp (copy_setup): Don't perror, use send_log.
(copy_executable): Return early if test2 is blank.
Return unsupported rather than unresolved if we can't run
executables. Do test1 if we can compile.
Index: binutils/testsuite/binutils-all/objcopy.exp
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objcopy.exp,v
retrieving revision 1.43
diff -u -p -r1.43 objcopy.exp
--- binutils/testsuite/binutils-all/objcopy.exp 24 Apr 2007 10:56:58 -0000 1.43
+++ binutils/testsuite/binutils-all/objcopy.exp 2 May 2007 10:08:18 -0000
@@ -516,7 +516,7 @@ proc copy_setup { } {
set status [lindex $result 0]
if { $status != "pass" } {
- perror "unresolved setup, status = $status"
+ send_log "cannot run executable, status = ${status}\n"
return 3
}
@@ -541,6 +541,9 @@ proc copy_executable { prog flags test1
if ![string match "" $exec_output] {
fail $test1
+ if [string match "" $test2] {
+ return
+ }
fail $test2
return
}
@@ -582,6 +585,10 @@ proc copy_executable { prog flags test1
fail $test1
}
+ if [string match "" $test2] {
+ return
+ }
+
set output [remote_load target tmpdir/copyprog]
set status [lindex $output 0]
if { $status != "pass" } {
@@ -693,10 +700,10 @@ switch [copy_setup] {
untested $test4
}
"3" {
- unresolved $test1
- unresolved $test2
- unresolved $test3
- unresolved $test4
+ copy_executable "$OBJCOPY" "$OBJCOPYFLAGS" "$test1" ""
+ unsupported $test2
+ unsupported $test3
+ unsupported $test4
}
"0" {
copy_executable "$OBJCOPY" "$OBJCOPYFLAGS" "$test1" "$test2"
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list