binutils-gdb/sim/testsuite/lib
Hans-Peter Nilsson 81064d7abc sim/testsuite: Support "requires: simoption <--name-of-option>"
Simulator features can be present or not, typically
depending on different-valued configure options, like
--enable-sim-hardware[=off|=on].  To avoid failures in
test-suite-runs when testing such configurations, a new
predicate is needed, as neither "target", "progos" nor
"mach" fits cleanly.

The immediate need was to check for presence of a simulator
option, but rather than a specialized "requires-simoption:"
predicate I thought I'd handle the general (parametrized)
need, so here's a generic predicate machinery and a (first)
predicate to use together with it; checking whether a
particular option is supported, by looking at "run --help"
output.  This was inspired by the check_effective_target_
machinery in the gcc test-suite.

Multiple "requires: <requirement> <parameter>" form a list of
predicates (with parameters), to be used as a conjunction.

sim/testsuite:
	* lib/sim-defs.exp (sim_check_requires_simoption): New function.
	(run_sim_test): Support "requires: <requirement> <parameter>".
2022-02-14 23:50:48 +01:00
..
compilercheck.c sim: testsuite: unify basic C compiler checks 2021-11-26 19:51:15 -05:00
linuxcheck.c sim: testsuite: initial support for OS-specific tests 2021-11-26 20:06:55 -05:00
newlibcheck.c sim: testsuite: initial support for OS-specific tests 2021-11-26 20:06:55 -05:00
sim-defs.exp sim/testsuite: Support "requires: simoption <--name-of-option>" 2022-02-14 23:50:48 +01:00