aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-04 09:05:21 -0400
committerMike Frysinger <vapier@gentoo.org>2021-04-08 00:47:49 -0400
commit1bcee7fd87d5335f7408467189cab92a7c837608 (patch)
treebd39e27397da38d688a43815703b0862545e06fb /sim
parenteec8bf7eab693186badfd5285cf713d3e22205e2 (diff)
downloadfsf-binutils-gdb-1bcee7fd87d5335f7408467189cab92a7c837608.zip
fsf-binutils-gdb-1bcee7fd87d5335f7408467189cab92a7c837608.tar.gz
fsf-binutils-gdb-1bcee7fd87d5335f7408467189cab92a7c837608.tar.bz2
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.
Diffstat (limited to 'sim')
-rw-r--r--sim/testsuite/ChangeLog5
-rw-r--r--sim/testsuite/lib/sim-defs.exp5
2 files changed, 10 insertions, 0 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 8876c38..113b6d5 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,5 +1,10 @@
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>
+
* lib/sim-defs.exp (sim_tool_path): New function.
(sim_run): Set sim to [sim_tool_path].
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 1b40216..e627b6e 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]