From 1bcee7fd87d5335f7408467189cab92a7c837608 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 4 Apr 2021 09:05:21 -0400 Subject: [PATCH] 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. --- sim/testsuite/ChangeLog | 5 +++++ sim/testsuite/lib/sim-defs.exp | 5 +++++ 2 files changed, 10 insertions(+) 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] -- 2.30.2