[gdb/testsuite] Check compilation result in gdb.base/structs.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)
commitc2fd8824c8ff4a7b48ef9f058be0038d1f6faa1f
treef382fa29a3e16afa9d10857e2cda4b018a206022
parentdc412de5e954d81dc932be7fa7c2edda992de096
[gdb/testsuite] Check compilation result in gdb.base/structs.exp

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

Fix this by checking the compilation result.

Fix the resulting DUPLICATEs using with_test_prefix.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/structs.exp