From: Mike Frysinger Date: Tue, 5 Jan 2021 05:19:33 +0000 (-0500) Subject: sim: h8300: simplify testsuite runner X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c7f5bd08c61ac3607f54cf1c5fe08f88b989175;p=binutils-gdb.git 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. --- diff --git a/sim/testsuite/sim/h8300/ChangeLog b/sim/testsuite/sim/h8300/ChangeLog index 43df10d4fc3..a4e7532352b 100644 --- a/sim/testsuite/sim/h8300/ChangeLog +++ b/sim/testsuite/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +2021-01-05 Mike Frysinger + + * allinsn.exp: Rewrite file to use globs. + 2004-06-28 Alexandre Oliva 2003-07-22 Michael Snyder diff --git a/sim/testsuite/sim/h8300/allinsn.exp b/sim/testsuite/sim/h8300/allinsn.exp index 82fedebe211..68468f6bb10 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 + } }