From: Mike Frysinger Date: Sun, 4 Apr 2021 13:05:21 +0000 (-0400) Subject: sim: testsuite: skip tests when the port is disabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1bcee7fd87d5335f7408467189cab92a7c837608;p=binutils-gdb.git 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. --- diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index 8876c386aeb..113b6d5622c 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-04-08 Mike Frysinger + + * lib/sim-defs.exp (run_sim_test): Return if sim_tool_path does not + exist. + 2021-04-08 Mike Frysinger * lib/sim-defs.exp (sim_tool_path): New function. diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp index 1b40216ea6e..e627b6efc59 100644 --- a/sim/testsuite/lib/sim-defs.exp +++ b/sim/testsuite/lib/sim-defs.exp @@ -205,6 +205,11 @@ proc run_sim_test { name requested_machs } { global global_cc_options global global_sim_options + if ![file exists [sim_tool_path]] { + unsupported "$name: missing simulator [sim_tool_path]" + return + } + if [string match "*/*" $name] { set file $name set name [file tail $name]