aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2004-11-16 16:20:32 +0000
committerHans-Peter Nilsson <hp@axis.com>2004-11-16 16:20:32 +0000
commit310ca70ce2bc8fa62519b849106a3eb95e2d7b36 (patch)
tree83c402ae450f1688a65017fa12fefccdc5f0a8d3
parent99b572768794355ea6e6ad7d46d63a3fb24ae58e (diff)
downloadbinutils-310ca70ce2bc8fa62519b849106a3eb95e2d7b36.zip
binutils-310ca70ce2bc8fa62519b849106a3eb95e2d7b36.tar.gz
binutils-310ca70ce2bc8fa62519b849106a3eb95e2d7b36.tar.bz2
* lib/sim-defs.exp (run_sim_test): Support "xfail" and "kfail".
-rw-r--r--sim/testsuite/ChangeLog1
-rw-r--r--sim/testsuite/lib/sim-defs.exp25
2 files changed, 26 insertions, 0 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 9c8b240..5fe75e1 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -2,6 +2,7 @@
* lib/sim-defs.exp (run_sim_test): Make multiple "output"
specifications concatenate, not override.
+ Support "xfail" and "kfail".
2004-10-26 Nick Clifton <nickc@redhat.com>
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 5b7b1f2..a81706f 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -163,9 +163,15 @@ proc sim_run { prog sim_opts prog_opts redir options } {
# sim[(mach-list)]: <simulator options>
# output: program output pattern to match with string-match
# xerror: program is expected to return with a "failure" exit code
+# xfail: <PRMS-opt> <target-triples-where-test-fails>
+# kfail: <PRMS> <target-triples-where-test-fails>
# If `output' is not specified, the program must output "pass" if !xerror or
# "fail" if xerror.
# The parens in "optname()" are optional if the specification is for all machs.
+# Multiple "output", "xfail" and "kfail" options concatenate.
+# The xfail and kfail arguments are space-separated target triplets and PRIDs.
+# There must be a PRMS (bug report ID) specified for kfail, while it's
+# optional for xfail.
proc run_sim_test { name requested_machs } {
global subdir srcdir
@@ -196,6 +202,8 @@ proc run_sim_test { name requested_machs } {
set opts(mach) ""
set opts(timeout) ""
set opts(xerror) "no"
+ set opts(xfail) ""
+ set opts(kfail) ""
if ![info exists global_as_options] {
set global_as_options ""
@@ -233,6 +241,11 @@ proc run_sim_test { name requested_machs } {
if { $opt_name == "output" } {
set opt_val "$opts(output)$opt_val"
}
+ # Similar with "xfail" and "kfail", but arguments are space-separated.
+ if { $opt_name == "xfail" || $opt_name == "kfail" } {
+ set opt_val "$opts($opt_name) $opt_val"
+ }
+
foreach m $opt_machs {
set opts($opt_name,$m) $opt_val
}
@@ -266,6 +279,18 @@ proc run_sim_test { name requested_machs } {
verbose -log "Testing $name on machine $mach."
+ # Time to setup xfailures and kfailures.
+ if { "$opts(xfail)" != "" } {
+ verbose -log "xfail: $opts(xfail)"
+ # Using eval to make $opts(xfail) appear as individual
+ # arguments.
+ eval setup_xfail $opts(xfail)
+ }
+ if { "$opts(kfail)" != "" } {
+ verbose -log "kfail: $opts(kfail)"
+ eval setup_kfail $opts(kfail)
+ }
+
if ![info exists opts(as,$mach)] {
set opts(as,$mach) $opts(as)
}