When running test-case gdb.dwarf2/dw2-opt-structptr.exp with target board
unix/-bad, I get:
...
gdb compile failed, gcc: error: unrecognized command line option '-bad'
UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: dw2-opt-structptr.exp
UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: failed to compile
ERROR: (dw2-opt-structptr) No such file or directory
UNRESOLVED: gdb.dwarf2/dw2-opt-structptr.exp: console: set print object on
...
Merge the two UNTESTEDs.
Fix the UNRESOLVED by checking result of compilation.
Tested on x86_64-linux.
}
set sources "$srcfile $asm_file"
- if {[build_executable $testfile.exp $testfile $sources {nodebug}]} {
- untested "failed to compile"
+ if {[build_executable "failed to compile" $testfile $sources {nodebug}]} {
return -1
}
}
}
}
-build_test_program
+if { [build_test_program] == -1 } {
+ return -1
+}
+
do_console_test
do_mi_test