[3/3] sim: testsuite: support exit 77 for unsupported tests

Message ID 20210404143538.14995-3-vapier@gentoo.org
State New
Headers show
Series
  • [1/3] sim: testsuite: calculate $arch from $subdir
Related show

Commit Message

Simon Marchi via Gdb-patches April 4, 2021, 2:35 p.m.
Exit status 77 is common (including the autotools world) to indicate
"skip this test".  Add support for mapping that to "unsupported" as
that's the closest in the dejagnu world.
---
 sim/testsuite/lib/sim-defs.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.30.2

Patch

diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index e627b6efc595..59c7dede83e4 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -402,7 +402,9 @@  proc run_sim_test { name requested_machs } {
 	set output [lindex $result 1]
 
 	set status fail
-	if { $return_code == $opts(status) } {
+	if { $return_code == 77 } {
+	    set status unsupported
+	} elseif { $return_code == $opts(status) } {
 	    set status pass
 	}