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.
This commit is contained in:
Mike Frysinger
2021-11-26 19:30:46 -05:00
parent e1e1ae6e9b
commit 4c721b266f
2 changed files with 9 additions and 0 deletions

View File

@ -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) ""

View File

@ -24,6 +24,10 @@ proc sim_has_rv_and_cris {} {
global objdir
global SIMFLAGS_FOR_TARGET
if ![file exists [sim_tool_path]] {
return 0
}
# We need to assemble and link a trivial program and pass that, in
# order to test successful exit.