aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-01-03 23:00:30 +1030
committerAlan Modra <amodra@gmail.com>2017-01-03 23:04:48 +1030
commita44d0bd787e4fdf2424583508f407bafa139ed8a (patch)
tree7dc9bd2e7c757a35cfe3645de92faa3bde1cef5b /ld/testsuite/lib/ld-lib.exp
parentFix PRU GAS for 32-bit hosts (diff)
downloadbinutils-gdb-a44d0bd787e4fdf2424583508f407bafa139ed8a.tar.gz
binutils-gdb-a44d0bd787e4fdf2424583508f407bafa139ed8a.tar.bz2
binutils-gdb-a44d0bd787e4fdf2424583508f407bafa139ed8a.zip
Check ld_compile return status
* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Do not allow test to continue after compilation errors. (run_cc_link_tests): Likewise.
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r--ld/testsuite/lib/ld-lib.exp24
1 files changed, 20 insertions, 4 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index f8d5ec6a059..5ca700bf27a 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1414,10 +1414,18 @@ proc run_ld_link_exec_tests { ldtests args } {
# incorrect section attributes and the assembler will warn
# them.
if { [ string match "c++" $lang ] } {
- ld_compile "$CXX -c $CXXFLAGS $cflags" $srcdir/$subdir/$src_file $objfile
+ set cmd "$CXX -c $CXXFLAGS $cflags"
} else {
- ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/$src_file $objfile
+ set cmd "$CC -c $CFLAGS $cflags"
}
+ if ![ld_compile $cmd $srcdir/$subdir/$src_file $objfile] {
+ set failed 1
+ break
+ }
+ }
+ if { $failed != 0 } {
+ unresolved $testname
+ continue
}
if { [ string match "c++" $lang ] } {
@@ -1549,10 +1557,18 @@ proc run_cc_link_tests { ldtests } {
# incorrect section attributes and the assembler will warn
# them.
if { [ string match "c++" $lang ] } {
- ld_compile "$CXX -c $CXXFLAGS $cflags" $srcdir/$subdir/$src_file $objfile
+ set cmd "$CXX -c $CXXFLAGS $cflags"
} else {
- ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/$src_file $objfile
+ set cmd "$CC -c $CFLAGS $cflags"
}
+ if ![ld_compile $cmd $srcdir/$subdir/$src_file $objfile] {
+ set failed 1
+ break
+ }
+ }
+ if { $failed != 0 } {
+ unresolved $testname
+ continue
}
# Clear error and warning counts.