sim: testsuite: skip tests when the port is disabled

If the port hasn't been enabled, don't try to run its tests.  Making
this dynamic simplifies the test harnesses and avoids duplicating a
bunch of target tuple checks.
This commit is contained in:
Mike Frysinger 2021-04-04 09:05:21 -04:00
parent eec8bf7eab
commit 1bcee7fd87
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2021-04-08 Mike Frysinger <vapier@gentoo.org>
* lib/sim-defs.exp (run_sim_test): Return if sim_tool_path does not
exist.
2021-04-08 Mike Frysinger <vapier@gentoo.org> 2021-04-08 Mike Frysinger <vapier@gentoo.org>
* lib/sim-defs.exp (sim_tool_path): New function. * lib/sim-defs.exp (sim_tool_path): New function.

View File

@ -205,6 +205,11 @@ proc run_sim_test { name requested_machs } {
global global_cc_options global global_cc_options
global global_sim_options global global_sim_options
if ![file exists [sim_tool_path]] {
unsupported "$name: missing simulator [sim_tool_path]"
return
}
if [string match "*/*" $name] { if [string match "*/*" $name] {
set file $name set file $name
set name [file tail $name] set name [file tail $name]