gdb/testsuite: Introduce skip_ctf_tests guard function
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 8 Oct 2019 09:09:31 +0000 (10:09 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 19 Nov 2019 00:37:20 +0000 (00:37 +0000)
commit30d0a63681c24106d4ea3239be4bbd72a0b67646
tree27639a84f195ea7a08603dc67f32455ec8cd69db
parent494409bb8a043b259435ad5034c66aa3fee15f52
gdb/testsuite: Introduce skip_ctf_tests guard function

Most versions of GCC in the wild don't support CTF debug format right
now, so, rather than attempting to compile the tests and failing each
time, this patch introduces a guard function to check if the compiler
supports CTF.  If we don't have CTF support then the CTF tests are
skipped.

This patch only updates 3 of the 4 CTF tests, the fourth will be
handled in the next patch.

gdb/testsuite/ChangeLog:

* gdb.base/ctf-constvars.exp: Skip test if CTF is not supported in
the compiler.  Clean up header comment a little.
* gdb.base/ctf-ptype.exp: Likewise.
* gdb.base/ctf-whatis.exp: Likewise.
* lib/gdb.exp (skip_ctf_tests): New proc.

Change-Id: I505c11169a9bc9871a31fc0c61e119f92f32cc63
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/ctf-constvars.exp
gdb/testsuite/gdb.base/ctf-ptype.exp
gdb/testsuite/gdb.base/ctf-whatis.exp
gdb/testsuite/lib/gdb.exp