aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-05 00:19:33 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-05 19:26:17 -0500
commit0c7f5bd08c61ac3607f54cf1c5fe08f88b989175 (patch)
treede6dd1153ab41ab8dcbf7705c15858df98258933 /sim
parent85dd67bd6dcd9ae45208bb18bcb09d0e9fafdcde (diff)
downloadfsf-binutils-gdb-0c7f5bd08c61ac3607f54cf1c5fe08f88b989175.zip
fsf-binutils-gdb-0c7f5bd08c61ac3607f54cf1c5fe08f88b989175.tar.gz
fsf-binutils-gdb-0c7f5bd08c61ac3607f54cf1c5fe08f88b989175.tar.bz2
sim: h8300: simplify testsuite runner
We don't need to manually enumerate every test. Use a glob function like every other port and rely on the (already existing) #mach headers in each file to filter out targets we don't care about.
Diffstat (limited to 'sim')
-rw-r--r--sim/testsuite/sim/h8300/ChangeLog4
-rw-r--r--sim/testsuite/sim/h8300/allinsn.exp72
2 files changed, 15 insertions, 61 deletions
diff --git a/sim/testsuite/sim/h8300/ChangeLog b/sim/testsuite/sim/h8300/ChangeLog
index 43df10d..a4e7532 100644
--- a/sim/testsuite/sim/h8300/ChangeLog
+++ b/sim/testsuite/sim/h8300/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-05 Mike Frysinger <vapier@gentoo.org>
+
+ * allinsn.exp: Rewrite file to use globs.
+
2004-06-28 Alexandre Oliva <aoliva@redhat.com>
2003-07-22 Michael Snyder <msnyder@redhat.com>
diff --git a/sim/testsuite/sim/h8300/allinsn.exp b/sim/testsuite/sim/h8300/allinsn.exp
index 82fedeb..68468f6 100644
--- a/sim/testsuite/sim/h8300/allinsn.exp
+++ b/sim/testsuite/sim/h8300/allinsn.exp
@@ -1,65 +1,15 @@
# Hitachi H8/300 (h, s, sx) simulator testsuite
-set all "h8300 h8300h h8300s h8sx"
-
if {[istarget h8300*-*-*] || [istarget h8sx*-*-*]} then {
- run_sim_test addb.s $all
- run_sim_test addw.s $all
- run_sim_test addl.s $all
- run_sim_test adds.s $all
- run_sim_test addx.s $all
- run_sim_test andb.s $all
- run_sim_test andw.s $all
- run_sim_test andl.s $all
- run_sim_test band.s $all
- run_sim_test bfld.s h8sx
- run_sim_test biand.s $all
- run_sim_test bra.s $all
- run_sim_test bset.s $all
- run_sim_test cmpb.s $all
- run_sim_test cmpw.s $all
- run_sim_test cmpl.s $all
- run_sim_test daa.s $all
- run_sim_test das.s $all
- run_sim_test dec.s $all
- run_sim_test div.s $all
- run_sim_test extw.s $all
- run_sim_test extl.s $all
- run_sim_test inc.s $all
- run_sim_test jmp.s $all
- run_sim_test ldc.s $all
- run_sim_test ldm.s $all
- run_sim_test mac.s $all
- run_sim_test movb.s $all
- run_sim_test movw.s $all
- run_sim_test movl.s $all
- run_sim_test mova.s h8sx
- run_sim_test movmd.s h8sx
- run_sim_test movsd.s h8sx
- run_sim_test mul.s $all
- run_sim_test neg.s $all
- run_sim_test nop.s $all
- run_sim_test not.s $all
- run_sim_test orb.s $all
- run_sim_test orw.s $all
- run_sim_test orl.s $all
- run_sim_test rotl.s $all
- run_sim_test rotr.s $all
- run_sim_test rotxl.s $all
- run_sim_test rotxr.s $all
- run_sim_test shal.s $all
- run_sim_test shar.s $all
- run_sim_test shll.s $all
- run_sim_test shlr.s $all
- run_sim_test stack.s $all
- run_sim_test stc.s $all
- run_sim_test subb.s $all
- run_sim_test subw.s $all
- run_sim_test subl.s $all
- run_sim_test subs.s $all
- run_sim_test subx.s $all
- run_sim_test tas.s $all
- run_sim_test xorb.s $all
- run_sim_test xorw.s $all
- run_sim_test xorl.s $all
+ set all_machs "h8300 h8300h h8300s h8sx"
+
+ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] {
+ # If we're only testing specific files and this isn't one of them,
+ # skip it.
+ if ![runtest_file_p $runtests $src] {
+ continue
+ }
+
+ run_sim_test $src $all_machs
+ }
}