[gdb/testsuite] Check compilation result in gdb.base/call-sc.exp
authorTom de Vries <tdevries@suse.de>
Thu, 30 Sep 2021 17:07:48 +0000 (19:07 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 30 Sep 2021 17:07:48 +0000 (19:07 +0200)
commite46da7ec1bd9d39e28a86e8d6c522a6ff7510a76
treed0cab111ee3f0a6fd539b92cc3bf968d56ff1b86
parentb6107a72badd38a2cf63fc09759ce281547c19a3
[gdb/testsuite] Check compilation result in gdb.base/call-sc.exp

When running test-case gdb.base/call-sc.exp with target board unix/-bad, I
get:
...
gdb compile failed, gcc: error: unrecognized command line option '-bad'
UNTESTED: gdb.base/call-sc.exp: failed to prepare
ERROR: tcl error sourcing src/gdb/testsuite/gdb.base/call-sc.exp.
ERROR: can't read "use_gdb_stub": no such variable
...

Fix this by checking the compilation result.

Fix the resulting DUPLICATE:
...
DUPLICATE: gdb.base/call-sc.exp: failed to prepare
...
using with_test_prefix.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/call-sc.exp