Change 'require' to accept a list of predicates
authorTom Tromey <tom@tromey.com>
Tue, 13 Dec 2022 22:00:07 +0000 (15:00 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:54 +0000 (13:18 -0700)
commit793862d2f427bdc7b80da5bb917acccb06c4ba61
tree615d1059ec9703698e76b4ca3127e21539130946
parent15bdcf4ca1514b89c242eccd3a74599bdd00e3e0
Change 'require' to accept a list of predicates

This changes 'require' to accept a list of simple predicates.  For
now, each predicate is just the name of a proc, optionally prefixed
with "!" to indicate that the result should be inverted.

It's possible to make this fancier, but so far I haven't done so.  One
idea I had is to allow a predicate to have associated text to display
on failure.  Another is to convert the predicates that need a running
gdb (e.g., skip_python_tests) to start their own gdb, and then
'require' could enforce the rule that gdb not be running when it is
called.
gdb/testsuite/gdb.base/valgrind-bt.exp
gdb/testsuite/gdb.base/valgrind-disp-step.exp
gdb/testsuite/gdb.base/valgrind-infcall-2.exp
gdb/testsuite/gdb.base/valgrind-infcall.exp
gdb/testsuite/gdb.dwarf2/dw2-lines.exp
gdb/testsuite/gdb.dwarf2/dw2-symtab-includes-lookup.exp
gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
gdb/testsuite/gdb.mi/mi-async.exp
gdb/testsuite/gdb.reverse/insn-reverse.exp
gdb/testsuite/gdb.tui/tui-missing-src.exp
gdb/testsuite/lib/gdb.exp