summaryrefslogtreecommitdiff
path: root/sim/testsuite/cris/c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-26 19:30:46 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-26 19:37:31 -0500
commit4c721b266fdae6e2761cc122fac4cfb42932e295 (patch)
tree6f1c7f355309c7c2a643765f9114a1d7516bdb6c /sim/testsuite/cris/c
parente1e1ae6e9b5e76daed22c8b2eb79fa3b5ade3335 (diff)
downloadbinutils-gdb-4c721b266fdae6e2761cc122fac4cfb42932e295.tar.gz
sim: cris: fix testsuite hang when sim is missing
If the cris sim hasn't been built yet, trying to run its testsuite will hang indefinitely. The common sim APIs already have this, so copy it over to the cris forks of the test+run functions.
Diffstat (limited to 'sim/testsuite/cris/c')
-rw-r--r--sim/testsuite/cris/c/c.exp5
1 files changed, 5 insertions, 0 deletions
diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp
index bd51d73432f..25d812ea735 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -94,6 +94,11 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
continue
}
+ if ![file exists [sim_tool_path]] {
+ untested $testname
+ return 0
+ }
+
# Clear default options
set opts(cc) ""
set opts(sim) ""