From 23cb7bac66bf6a24e71390ce7ead5d327ae85439 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 4 Apr 2021 09:01:09 -0400 Subject: [PATCH] sim: testsuite: calculate $arch from $subdir Since we require ports to use a matching subdir name in the testsuite tree, we can use that to calculate the $arch value. --- sim/testsuite/ChangeLog | 5 +++++ sim/testsuite/aarch64/ChangeLog | 4 ++++ sim/testsuite/aarch64/allinsn.exp | 4 ---- sim/testsuite/arm/ChangeLog | 6 +++++ sim/testsuite/arm/allinsn.exp | 4 ---- sim/testsuite/arm/iwmmxt/iwmmxt.exp | 4 ---- sim/testsuite/arm/misc.exp | 4 ---- sim/testsuite/arm/thumb/allthumb.exp | 4 ---- sim/testsuite/arm/xscale/xscale.exp | 4 ---- sim/testsuite/avr/ChangeLog | 4 ++++ sim/testsuite/avr/allinsn.exp | 4 ---- sim/testsuite/bfin/ChangeLog | 4 ++++ sim/testsuite/bfin/allinsn.exp | 4 ---- sim/testsuite/bpf/ChangeLog | 4 ++++ sim/testsuite/bpf/allinsn.exp | 4 ---- sim/testsuite/cr16/ChangeLog | 5 +++++ sim/testsuite/cr16/allinsn.exp | 4 ---- sim/testsuite/cr16/misc.exp | 4 ---- sim/testsuite/cris/ChangeLog | 5 +++++ sim/testsuite/cris/asm/asm.exp | 4 ---- sim/testsuite/cris/c/c.exp | 4 ---- sim/testsuite/cris/hw/rv-n-cris/rvc.exp | 7 +----- sim/testsuite/d10v/ChangeLog | 4 ++++ sim/testsuite/d10v/allinsn.exp | 4 ---- sim/testsuite/example-synacor/ChangeLog | 4 ++++ sim/testsuite/example-synacor/allinsn.exp | 4 ---- sim/testsuite/frv/ChangeLog | 6 +++++ sim/testsuite/frv/allinsn.exp | 4 ---- sim/testsuite/frv/fr400/allinsn.exp | 4 ---- sim/testsuite/frv/fr500/allinsn.exp | 4 ---- sim/testsuite/frv/fr550/allinsn.exp | 4 ---- sim/testsuite/frv/interrupts.exp | 4 ---- sim/testsuite/frv/misc.exp | 4 ---- sim/testsuite/frv/parallel.exp | 4 ---- sim/testsuite/ft32/ChangeLog | 4 ++++ sim/testsuite/ft32/allinsn.exp | 4 ---- sim/testsuite/h8300/ChangeLog | 4 ++++ sim/testsuite/h8300/allinsn.exp | 4 ---- sim/testsuite/iq2000/ChangeLog | 4 ++++ sim/testsuite/iq2000/allinsn.exp | 4 ---- sim/testsuite/lib/sim-defs.exp | 27 ++++++++++++++--------- sim/testsuite/lm32/ChangeLog | 4 ++++ sim/testsuite/lm32/allinsn.exp | 4 ---- sim/testsuite/m32c/ChangeLog | 4 ++++ sim/testsuite/m32c/allinsn.exp | 4 ---- sim/testsuite/m32r/ChangeLog | 5 +++++ sim/testsuite/m32r/allinsn.exp | 4 ---- sim/testsuite/m32r/misc.exp | 4 ---- sim/testsuite/m68hc11/ChangeLog | 4 ++++ sim/testsuite/m68hc11/allinsn.exp | 4 ---- sim/testsuite/mcore/ChangeLog | 4 ++++ sim/testsuite/mcore/allinsn.exp | 4 ---- sim/testsuite/microblaze/ChangeLog | 4 ++++ sim/testsuite/microblaze/allinsn.exp | 4 ---- sim/testsuite/mips/ChangeLog | 4 ++++ sim/testsuite/mips/basic.exp | 4 ---- sim/testsuite/mn10300/ChangeLog | 4 ++++ sim/testsuite/mn10300/allinsn.exp | 4 ---- sim/testsuite/moxie/ChangeLog | 4 ++++ sim/testsuite/moxie/allinsn.exp | 4 ---- sim/testsuite/msp430/ChangeLog | 4 ++++ sim/testsuite/msp430/allinsn.exp | 4 ---- sim/testsuite/or1k/ChangeLog | 4 ++++ sim/testsuite/or1k/alltests.exp | 4 ---- sim/testsuite/pru/ChangeLog | 4 ++++ sim/testsuite/pru/allinsn.exp | 4 ---- sim/testsuite/riscv/ChangeLog | 4 ++++ sim/testsuite/riscv/allinsn.exp | 4 ---- sim/testsuite/sh/ChangeLog | 4 ++++ sim/testsuite/sh/allinsn.exp | 4 ---- sim/testsuite/v850/ChangeLog | 4 ++++ sim/testsuite/v850/allinsns.exp | 4 ---- 72 files changed, 142 insertions(+), 180 deletions(-) diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index b9efa9208c6..8876c386aeb 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-04-08 Mike Frysinger + + * lib/sim-defs.exp (sim_tool_path): New function. + (sim_run): Set sim to [sim_tool_path]. + 2021-04-03 Mike Frysinger * lib/sim-defs.exp (run_sim_test): Convert examples to binaries. diff --git a/sim/testsuite/aarch64/ChangeLog b/sim/testsuite/aarch64/ChangeLog index 29378ce49ca..9a6c8343814 100644 --- a/sim/testsuite/aarch64/ChangeLog +++ b/sim/testsuite/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/aarch64/allinsn.exp b/sim/testsuite/aarch64/allinsn.exp index 04a234f5357..54d64784c23 100644 --- a/sim/testsuite/aarch64/allinsn.exp +++ b/sim/testsuite/aarch64/allinsn.exp @@ -1,10 +1,6 @@ # AArch64 simulator testsuite if [istarget aarch64*-*] { - # Used to locate the `run` program. - global arch - set arch "aarch64" - # all machines set all_machs "aarch64" diff --git a/sim/testsuite/arm/ChangeLog b/sim/testsuite/arm/ChangeLog index a1e80feb607..89fab48557b 100644 --- a/sim/testsuite/arm/ChangeLog +++ b/sim/testsuite/arm/ChangeLog @@ -1,3 +1,9 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + * iwmmxt/iwmmxt.exp, misc.exp, thumb/allthumb.exp, xscale/xscale.exp: + Likewise. + 2021-02-13 Mike Frysinger * allinsn.exp, iwmmxt/iwmmxt.exp, misc.exp, thumb/allthumb.ex, diff --git a/sim/testsuite/arm/allinsn.exp b/sim/testsuite/arm/allinsn.exp index 89ff9659479..c4d1ccecc3c 100644 --- a/sim/testsuite/arm/allinsn.exp +++ b/sim/testsuite/arm/allinsn.exp @@ -1,10 +1,6 @@ # ARM simulator testsuite. if { [istarget arm*-*-*] } { - # Used to locate the `run` program. - global arch - set arch "arm" - # all machines set all_machs "xscale" diff --git a/sim/testsuite/arm/iwmmxt/iwmmxt.exp b/sim/testsuite/arm/iwmmxt/iwmmxt.exp index 9710f3670ba..4aff9c7d028 100644 --- a/sim/testsuite/arm/iwmmxt/iwmmxt.exp +++ b/sim/testsuite/arm/iwmmxt/iwmmxt.exp @@ -1,10 +1,6 @@ # Intel(r) Wireless MMX(tm) technology simulator testsuite. if { [istarget arm*-*-*] } { - # Used to locate the `run` program. - global arch - set arch "arm" - # all machines set all_machs "xscale" diff --git a/sim/testsuite/arm/misc.exp b/sim/testsuite/arm/misc.exp index ea6fd3c3c9a..818ee58adec 100644 --- a/sim/testsuite/arm/misc.exp +++ b/sim/testsuite/arm/misc.exp @@ -1,10 +1,6 @@ # Miscellaneous ARM simulator testcases if { [istarget arm*-*-*] } { - # Used to locate the `run` program. - global arch - set arch "arm" - # all machines set all_machs "arm7tdmi" diff --git a/sim/testsuite/arm/thumb/allthumb.exp b/sim/testsuite/arm/thumb/allthumb.exp index eca5fa18c71..ec09a0da829 100644 --- a/sim/testsuite/arm/thumb/allthumb.exp +++ b/sim/testsuite/arm/thumb/allthumb.exp @@ -1,10 +1,6 @@ # ARM simulator testsuite. if { [istarget arm*-*-*] } { - # Used to locate the `run` program. - global arch - set arch "arm" - # all machines set all_machs "arm7tdmi" diff --git a/sim/testsuite/arm/xscale/xscale.exp b/sim/testsuite/arm/xscale/xscale.exp index 20c9df80351..e65a952dadb 100644 --- a/sim/testsuite/arm/xscale/xscale.exp +++ b/sim/testsuite/arm/xscale/xscale.exp @@ -1,10 +1,6 @@ # XSCALE simulator testsuite. if { [istarget arm*-*-*] } { - # Used to locate the `run` program. - global arch - set arch "arm" - # all machines set all_machs "xscale" diff --git a/sim/testsuite/avr/ChangeLog b/sim/testsuite/avr/ChangeLog index 8ee57d29d13..5ce686f4db1 100644 --- a/sim/testsuite/avr/ChangeLog +++ b/sim/testsuite/avr/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/avr/allinsn.exp b/sim/testsuite/avr/allinsn.exp index a5c16b629b7..584a93da930 100644 --- a/sim/testsuite/avr/allinsn.exp +++ b/sim/testsuite/avr/allinsn.exp @@ -1,10 +1,6 @@ # avr simulator testsuite if [istarget avr-*] { - # Used to locate the `run` program. - global arch - set arch "avr" - # all machines set all_machs "avr" diff --git a/sim/testsuite/bfin/ChangeLog b/sim/testsuite/bfin/ChangeLog index ff7f639922e..2abca7eee7c 100644 --- a/sim/testsuite/bfin/ChangeLog +++ b/sim/testsuite/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/bfin/allinsn.exp b/sim/testsuite/bfin/allinsn.exp index 3d3378171c6..aa304eaa9b4 100644 --- a/sim/testsuite/bfin/allinsn.exp +++ b/sim/testsuite/bfin/allinsn.exp @@ -1,10 +1,6 @@ # Analog Devices Blackfin simulator testsuite if [istarget bfin-*-elf] { - # Used to locate the `run` program. - global arch - set arch "bfin" - # all machines set all_machs "bfin" diff --git a/sim/testsuite/bpf/ChangeLog b/sim/testsuite/bpf/ChangeLog index 76d54e1369d..5814a7c768a 100644 --- a/sim/testsuite/bpf/ChangeLog +++ b/sim/testsuite/bpf/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/bpf/allinsn.exp b/sim/testsuite/bpf/allinsn.exp index ffffd8a6892..2cca77021af 100644 --- a/sim/testsuite/bpf/allinsn.exp +++ b/sim/testsuite/bpf/allinsn.exp @@ -1,10 +1,6 @@ # eBPF simulator testsuite if [istarget bpf-unknown-none] { - # Used to locate the `run` program. - global arch - set arch "bpf" - # all machines set all_machs "bpf" diff --git a/sim/testsuite/cr16/ChangeLog b/sim/testsuite/cr16/ChangeLog index b241c860949..68353f04910 100644 --- a/sim/testsuite/cr16/ChangeLog +++ b/sim/testsuite/cr16/ChangeLog @@ -1,3 +1,8 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + * misc.exp: Likewise. + 2021-02-13 Mike Frysinger * allinsn.exp, misc.exp: Define arch. diff --git a/sim/testsuite/cr16/allinsn.exp b/sim/testsuite/cr16/allinsn.exp index 1b6847c7815..d6602b4c682 100644 --- a/sim/testsuite/cr16/allinsn.exp +++ b/sim/testsuite/cr16/allinsn.exp @@ -1,10 +1,6 @@ # CR16 simulator testsuite. if [istarget cr16*-*-*] { - # Used to locate the `run` program. - global arch - set arch "cr16" - # all machines set all_machs "cr16" diff --git a/sim/testsuite/cr16/misc.exp b/sim/testsuite/cr16/misc.exp index 67fa4c2d7d3..5f9d68132b6 100644 --- a/sim/testsuite/cr16/misc.exp +++ b/sim/testsuite/cr16/misc.exp @@ -1,10 +1,6 @@ # Miscellaneous CR16 simulator testcases if [istarget cr16*-*-*] { - # Used to locate the `run` program. - global arch - set arch "cr16" - # all machines set all_machs "cr16" diff --git a/sim/testsuite/cris/ChangeLog b/sim/testsuite/cris/ChangeLog index d780e2c1d31..121b6f32617 100644 --- a/sim/testsuite/cris/ChangeLog +++ b/sim/testsuite/cris/ChangeLog @@ -1,3 +1,8 @@ +2021-04-08 Mike Frysinger + + * asm/asm.exp (arch): Delete. + * c/c.exp, hw/rv-n-cris/rvc.exp: Likewise. + 2021-02-13 Mike Frysinger * asm/asm.exp, c/c.exp, hw/rv-n-cris/rvc.exp: Define arch. diff --git a/sim/testsuite/cris/asm/asm.exp b/sim/testsuite/cris/asm/asm.exp index b8c14c8d05c..415bbf1082a 100644 --- a/sim/testsuite/cris/asm/asm.exp +++ b/sim/testsuite/cris/asm/asm.exp @@ -16,10 +16,6 @@ # Miscellaneous CRIS simulator testcases in assembly code. if [istarget cris*-*-*] { - # Used to locate the `run` program. - global arch - set arch "cris" - global ASFLAGS_FOR_TARGET # All machines we test and the corresponding assembler option. Needs # update if we build the simulator for crisv0 crisv3 and crisv8 too. diff --git a/sim/testsuite/cris/c/c.exp b/sim/testsuite/cris/c/c.exp index 3d493b7c144..08ea18812ec 100644 --- a/sim/testsuite/cris/c/c.exp +++ b/sim/testsuite/cris/c/c.exp @@ -19,10 +19,6 @@ if ![istarget cris*-*-*] { return } -# Used to locate the `run` program. -global arch -set arch "cris" - set CFLAGS_FOR_TARGET "-O2" if [istarget cris-*-*] { set mach "crisv10" diff --git a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp index 0a018fa4b88..4e302d2238f 100644 --- a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp +++ b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp @@ -112,10 +112,6 @@ proc slurp_rv { file } { # The main test loop. if [istarget cris*-*-*] { - # Used to locate the `run` program. - global arch - set arch "cris" - global ASFLAGS_FOR_TARGET set has_rv_and_cris [sim_has_rv_and_cris] global global_as_options @@ -129,8 +125,7 @@ if [istarget cris*-*-*] { set sim [board_info target sim] if [string equal "" $sim] { global objdir - global arch - set rvdummy "$objdir/../$arch/rvdummy" + set rvdummy "$objdir/cris/rvdummy" } else { set rvdummy "[file dirname [board_info target sim]]/rvdummy" } diff --git a/sim/testsuite/d10v/ChangeLog b/sim/testsuite/d10v/ChangeLog index d04d884513c..f50a384c812 100644 --- a/sim/testsuite/d10v/ChangeLog +++ b/sim/testsuite/d10v/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/d10v/allinsn.exp b/sim/testsuite/d10v/allinsn.exp index e2e44a29092..5f1a13177f1 100644 --- a/sim/testsuite/d10v/allinsn.exp +++ b/sim/testsuite/d10v/allinsn.exp @@ -1,10 +1,6 @@ # d10v simulator testsuite. if [istarget d10v*-*] { - # Used to locate the `run` program. - global arch - set arch "d10v" - # all machines set all_machs "d10v" diff --git a/sim/testsuite/example-synacor/ChangeLog b/sim/testsuite/example-synacor/ChangeLog index 5d456213066..bb9b0b49932 100644 --- a/sim/testsuite/example-synacor/ChangeLog +++ b/sim/testsuite/example-synacor/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-04-03 Mike Frysinger * add.s, allinsn.exp, and.s, call.s, exit-0.s, gt.s, isa.inc, jmp.s, diff --git a/sim/testsuite/example-synacor/allinsn.exp b/sim/testsuite/example-synacor/allinsn.exp index 7210a610e73..a73312b8adf 100644 --- a/sim/testsuite/example-synacor/allinsn.exp +++ b/sim/testsuite/example-synacor/allinsn.exp @@ -1,10 +1,6 @@ # Example synacor simulator testsuite. if [istarget *] { - # Used to locate the `run` program. - global arch - set arch "example-synacor" - # All machines. set all_machs "example" diff --git a/sim/testsuite/frv/ChangeLog b/sim/testsuite/frv/ChangeLog index 7a34cf456f7..aa7409f3ab3 100644 --- a/sim/testsuite/frv/ChangeLog +++ b/sim/testsuite/frv/ChangeLog @@ -1,3 +1,9 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + * fr400/allinsn.exp, fr500/allinsn.exp, fr550/allinsn.exp, + interrupts.exp, misc.exp, parallel.exp: Likewise. + 2021-02-13 Mike Frysinger * allinsn.exp, fr400/allinsn.exp, fr500/allinsn.exp, diff --git a/sim/testsuite/frv/allinsn.exp b/sim/testsuite/frv/allinsn.exp index 2633f30df56..1781bf0ed17 100644 --- a/sim/testsuite/frv/allinsn.exp +++ b/sim/testsuite/frv/allinsn.exp @@ -1,10 +1,6 @@ # FRV simulator testsuite. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "frv fr500 fr550 fr400 fr405 fr450" set cpu_option -mcpu diff --git a/sim/testsuite/frv/fr400/allinsn.exp b/sim/testsuite/frv/fr400/allinsn.exp index ea5846f8fa4..03ccbd6e8ab 100644 --- a/sim/testsuite/frv/fr400/allinsn.exp +++ b/sim/testsuite/frv/fr400/allinsn.exp @@ -1,10 +1,6 @@ # FRV simulator testsuite. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "fr400 fr405 fr450 fr550" set cpu_option -mcpu diff --git a/sim/testsuite/frv/fr500/allinsn.exp b/sim/testsuite/frv/fr500/allinsn.exp index 40caa630706..fa03797d39c 100644 --- a/sim/testsuite/frv/fr500/allinsn.exp +++ b/sim/testsuite/frv/fr500/allinsn.exp @@ -1,10 +1,6 @@ # FRV simulator testsuite. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "frv fr500 fr550" set cpu_option -mcpu diff --git a/sim/testsuite/frv/fr550/allinsn.exp b/sim/testsuite/frv/fr550/allinsn.exp index 8768a671994..c0e373aa267 100644 --- a/sim/testsuite/frv/fr550/allinsn.exp +++ b/sim/testsuite/frv/fr550/allinsn.exp @@ -1,10 +1,6 @@ # FRV simulator testsuite. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "fr550" set cpu_option -mcpu diff --git a/sim/testsuite/frv/interrupts.exp b/sim/testsuite/frv/interrupts.exp index d1f7628d962..6b2c84a629a 100644 --- a/sim/testsuite/frv/interrupts.exp +++ b/sim/testsuite/frv/interrupts.exp @@ -1,10 +1,6 @@ # FRV simulator testsuite. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "frv fr500 fr550 fr400" set cpu_option -mcpu diff --git a/sim/testsuite/frv/misc.exp b/sim/testsuite/frv/misc.exp index d9c80a54600..fb394bb17f0 100644 --- a/sim/testsuite/frv/misc.exp +++ b/sim/testsuite/frv/misc.exp @@ -1,10 +1,6 @@ # Miscellaneous FRV simulator testcases. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "frv fr500 fr550 fr400 fr405 fr450" set cpu_option -mcpu diff --git a/sim/testsuite/frv/parallel.exp b/sim/testsuite/frv/parallel.exp index a883b9891d5..612a1bfd9e1 100644 --- a/sim/testsuite/frv/parallel.exp +++ b/sim/testsuite/frv/parallel.exp @@ -1,10 +1,6 @@ # FRV simulator testsuite. if [istarget frv*-*] { - # Used to locate the `run` program. - global arch - set arch "frv" - # all machines set all_machs "frv fr500 fr550 fr400" set cpu_option -mcpu diff --git a/sim/testsuite/ft32/ChangeLog b/sim/testsuite/ft32/ChangeLog index d7aba74aac2..346ac7476ae 100644 --- a/sim/testsuite/ft32/ChangeLog +++ b/sim/testsuite/ft32/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/ft32/allinsn.exp b/sim/testsuite/ft32/allinsn.exp index 50827a59247..730b4223632 100644 --- a/sim/testsuite/ft32/allinsn.exp +++ b/sim/testsuite/ft32/allinsn.exp @@ -1,10 +1,6 @@ # ft32 simulator testsuite if [istarget ft32-*] { - # Used to locate the `run` program. - global arch - set arch "ft32" - # all machines set all_machs "ft32" diff --git a/sim/testsuite/h8300/ChangeLog b/sim/testsuite/h8300/ChangeLog index 98020b806dc..3a91705885e 100644 --- a/sim/testsuite/h8300/ChangeLog +++ b/sim/testsuite/h8300/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/h8300/allinsn.exp b/sim/testsuite/h8300/allinsn.exp index 5355bf58a69..68468f6bb10 100644 --- a/sim/testsuite/h8300/allinsn.exp +++ b/sim/testsuite/h8300/allinsn.exp @@ -1,10 +1,6 @@ # Hitachi H8/300 (h, s, sx) simulator testsuite if {[istarget h8300*-*-*] || [istarget h8sx*-*-*]} then { - # Used to locate the `run` program. - global arch - set arch "h8300" - set all_machs "h8300 h8300h h8300s h8sx" foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] { diff --git a/sim/testsuite/iq2000/ChangeLog b/sim/testsuite/iq2000/ChangeLog index 8eb2490bb4d..4c94a665507 100644 --- a/sim/testsuite/iq2000/ChangeLog +++ b/sim/testsuite/iq2000/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/iq2000/allinsn.exp b/sim/testsuite/iq2000/allinsn.exp index 96d58435fb4..38eee9b277f 100644 --- a/sim/testsuite/iq2000/allinsn.exp +++ b/sim/testsuite/iq2000/allinsn.exp @@ -1,10 +1,6 @@ # iq2000 simulator testsuite if [istarget iq2000-*] { - # Used to locate the `run` program. - global arch - set arch "iq2000" - # all machines set all_machs "iq2000" diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp index e1254a3278c..1b40216ea6e 100644 --- a/sim/testsuite/lib/sim-defs.exp +++ b/sim/testsuite/lib/sim-defs.exp @@ -48,6 +48,22 @@ proc sim_compile { source dest type options } { return $result } +# Find the path to the simulator for executing. +proc sim_tool_path {} { + global sim_path + set sim "$sim_path" + if [string equal "" $sim] { + global objdir + global subdir + set arch "$subdir" + while { [file dirname $arch] != "." } { + set arch [file dirname $arch] + } + return "$objdir/$arch/run" + } + return "$sim" +} + # Run a program on the simulator. # Required by dejagnu (at least ${tool}_run used to be). # @@ -98,16 +114,7 @@ proc sim_run { prog sim_opts prog_opts redir options } { verbose "testcase timeout is set to $testcase_timeout" 1 - set sim [board_info target sim] - if [string equal "" $sim] { - # Special case the simulator. These tests are designed to - # be run inside of the simulator, not on the native host. - # So if the sim target isn't set, default to the target run. - # These global variables come from generated site.exp. - global objdir - global arch - set sim "$objdir/$arch/run" - } + set sim [sim_tool_path] if [is_remote host] { set prog [remote_download host $prog] diff --git a/sim/testsuite/lm32/ChangeLog b/sim/testsuite/lm32/ChangeLog index 8eb2490bb4d..4c94a665507 100644 --- a/sim/testsuite/lm32/ChangeLog +++ b/sim/testsuite/lm32/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/lm32/allinsn.exp b/sim/testsuite/lm32/allinsn.exp index ae7c141bd64..61744985f6c 100644 --- a/sim/testsuite/lm32/allinsn.exp +++ b/sim/testsuite/lm32/allinsn.exp @@ -1,10 +1,6 @@ # lm32 simulator testsuite if [istarget lm32-*] { - # Used to locate the `run` program. - global arch - set arch "lm32" - # all machines set all_machs "lm32" diff --git a/sim/testsuite/m32c/ChangeLog b/sim/testsuite/m32c/ChangeLog index ce68cc35d45..8172521f379 100644 --- a/sim/testsuite/m32c/ChangeLog +++ b/sim/testsuite/m32c/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/m32c/allinsn.exp b/sim/testsuite/m32c/allinsn.exp index b09b505972a..fb5ccca282e 100644 --- a/sim/testsuite/m32c/allinsn.exp +++ b/sim/testsuite/m32c/allinsn.exp @@ -2,10 +2,6 @@ # TODO: Add support for .c tests. if [istarget m32c*-*-*] { - # Used to locate the `run` program. - global arch - set arch "m32c" - # all machines set all_machs "m32c" diff --git a/sim/testsuite/m32r/ChangeLog b/sim/testsuite/m32r/ChangeLog index e855c1a4804..6e6facbf9bd 100644 --- a/sim/testsuite/m32r/ChangeLog +++ b/sim/testsuite/m32r/ChangeLog @@ -1,3 +1,8 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + * misc.exp: Likewise. + 2021-02-13 Mike Frysinger * allinsn.exp, misc.exp: Define arch. diff --git a/sim/testsuite/m32r/allinsn.exp b/sim/testsuite/m32r/allinsn.exp index a800e78b1b4..17a86189f79 100644 --- a/sim/testsuite/m32r/allinsn.exp +++ b/sim/testsuite/m32r/allinsn.exp @@ -1,10 +1,6 @@ # M32R simulator testsuite. if [istarget m32r*-*-*] { - # Used to locate the `run` program. - global arch - set arch "m32r" - # all machines set all_machs "m32r" diff --git a/sim/testsuite/m32r/misc.exp b/sim/testsuite/m32r/misc.exp index e571c2eeb69..6c624e737e7 100644 --- a/sim/testsuite/m32r/misc.exp +++ b/sim/testsuite/m32r/misc.exp @@ -1,10 +1,6 @@ # Miscellaneous M32R simulator testcases if [istarget m32r*-*-*] { - # Used to locate the `run` program. - global arch - set arch "m32r" - # all machines set all_machs "m32r" diff --git a/sim/testsuite/m68hc11/ChangeLog b/sim/testsuite/m68hc11/ChangeLog index 8eb2490bb4d..4c94a665507 100644 --- a/sim/testsuite/m68hc11/ChangeLog +++ b/sim/testsuite/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/m68hc11/allinsn.exp b/sim/testsuite/m68hc11/allinsn.exp index 0e9b51ec593..db0cbd5d467 100644 --- a/sim/testsuite/m68hc11/allinsn.exp +++ b/sim/testsuite/m68hc11/allinsn.exp @@ -1,10 +1,6 @@ # m68hc11 simulator testsuite if [istarget m68hc11-*] { - # Used to locate the `run` program. - global arch - set arch "m68hc11" - # all machines set all_machs "m68hc11" diff --git a/sim/testsuite/mcore/ChangeLog b/sim/testsuite/mcore/ChangeLog index 18a2292c2f0..78f076918ee 100644 --- a/sim/testsuite/mcore/ChangeLog +++ b/sim/testsuite/mcore/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/mcore/allinsn.exp b/sim/testsuite/mcore/allinsn.exp index ecc934b2014..5921cfc2643 100644 --- a/sim/testsuite/mcore/allinsn.exp +++ b/sim/testsuite/mcore/allinsn.exp @@ -1,10 +1,6 @@ # mcore simulator testsuite if [istarget mcore-*] { - # Used to locate the `run` program. - global arch - set arch "mcore" - # all machines set all_machs "mcore" diff --git a/sim/testsuite/microblaze/ChangeLog b/sim/testsuite/microblaze/ChangeLog index 5808b63ab60..b282fc3a31c 100644 --- a/sim/testsuite/microblaze/ChangeLog +++ b/sim/testsuite/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/microblaze/allinsn.exp b/sim/testsuite/microblaze/allinsn.exp index 5f5a4475eed..f756914292c 100644 --- a/sim/testsuite/microblaze/allinsn.exp +++ b/sim/testsuite/microblaze/allinsn.exp @@ -1,10 +1,6 @@ # microblaze simulator testsuite if [istarget microblaze-*] { - # Used to locate the `run` program. - global arch - set arch "microblaze" - # all machines set all_machs "microblaze" diff --git a/sim/testsuite/mips/ChangeLog b/sim/testsuite/mips/ChangeLog index feedcd36c9b..b64f6912d10 100644 --- a/sim/testsuite/mips/ChangeLog +++ b/sim/testsuite/mips/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * basic.exp (arch): Delete. + 2021-02-13 Mike Frysinger * basic.exp: Define arch. diff --git a/sim/testsuite/mips/basic.exp b/sim/testsuite/mips/basic.exp index 2eff923c0fc..352b3b4e719 100644 --- a/sim/testsuite/mips/basic.exp +++ b/sim/testsuite/mips/basic.exp @@ -42,10 +42,6 @@ proc run_sim_tests { name requested_machs { requested_micromips_machs "" } } { # Only test mips*-*-elf (e.g., no mips*-*-linux) if {[istarget mips*-*-elf]} { - # Used to locate the `run` program. - global arch - set arch "mips" - set dspmodels "" set mdmxmodels "" set micromipsmodels "" diff --git a/sim/testsuite/mn10300/ChangeLog b/sim/testsuite/mn10300/ChangeLog index 8eb2490bb4d..4c94a665507 100644 --- a/sim/testsuite/mn10300/ChangeLog +++ b/sim/testsuite/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/mn10300/allinsn.exp b/sim/testsuite/mn10300/allinsn.exp index 7166aefddf3..f8431e7222e 100644 --- a/sim/testsuite/mn10300/allinsn.exp +++ b/sim/testsuite/mn10300/allinsn.exp @@ -1,10 +1,6 @@ # mn10300 simulator testsuite if [istarget mn10300-*] { - # Used to locate the `run` program. - global arch - set arch "mn10300" - # all machines set all_machs "mn10300" diff --git a/sim/testsuite/moxie/ChangeLog b/sim/testsuite/moxie/ChangeLog index 8eb2490bb4d..4c94a665507 100644 --- a/sim/testsuite/moxie/ChangeLog +++ b/sim/testsuite/moxie/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/moxie/allinsn.exp b/sim/testsuite/moxie/allinsn.exp index 241e6757625..1a6af8b37d4 100644 --- a/sim/testsuite/moxie/allinsn.exp +++ b/sim/testsuite/moxie/allinsn.exp @@ -1,10 +1,6 @@ # moxie simulator testsuite if [istarget moxie-*] { - # Used to locate the `run` program. - global arch - set arch "moxie" - # all machines set all_machs "moxie" diff --git a/sim/testsuite/msp430/ChangeLog b/sim/testsuite/msp430/ChangeLog index df36ad6e5dc..ebb42c559cb 100644 --- a/sim/testsuite/msp430/ChangeLog +++ b/sim/testsuite/msp430/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/msp430/allinsn.exp b/sim/testsuite/msp430/allinsn.exp index 83030290cce..affa8aedc2a 100644 --- a/sim/testsuite/msp430/allinsn.exp +++ b/sim/testsuite/msp430/allinsn.exp @@ -1,10 +1,6 @@ # msp430 simulator testsuite if [istarget msp430-*] { - # Used to locate the `run` program. - global arch - set arch "msp430" - # all machines set all_machs "msp430" diff --git a/sim/testsuite/or1k/ChangeLog b/sim/testsuite/or1k/ChangeLog index f4bc2e1f263..b105c0f0cfd 100644 --- a/sim/testsuite/or1k/ChangeLog +++ b/sim/testsuite/or1k/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * alltests.exp (arch): Delete. + 2021-02-13 Mike Frysinger * alltests.exp: Define arch. diff --git a/sim/testsuite/or1k/alltests.exp b/sim/testsuite/or1k/alltests.exp index 98c1345d0be..365f3910deb 100644 --- a/sim/testsuite/or1k/alltests.exp +++ b/sim/testsuite/or1k/alltests.exp @@ -16,10 +16,6 @@ # along with this program. If not, see . if [istarget or1k*-*-*] { - # Used to locate the `run` program. - global arch - set arch "or1k" - set all_machs "or1k" global global_ld_options diff --git a/sim/testsuite/pru/ChangeLog b/sim/testsuite/pru/ChangeLog index c6a0af5f026..a10ff0bc16f 100644 --- a/sim/testsuite/pru/ChangeLog +++ b/sim/testsuite/pru/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/pru/allinsn.exp b/sim/testsuite/pru/allinsn.exp index c0d5ce93689..d147f731c91 100644 --- a/sim/testsuite/pru/allinsn.exp +++ b/sim/testsuite/pru/allinsn.exp @@ -19,10 +19,6 @@ # along with this program. If not, see . if [istarget pru-*] { - # Used to locate the `run` program. - global arch - set arch "pru" - # all machines set all_machs "pru" diff --git a/sim/testsuite/riscv/ChangeLog b/sim/testsuite/riscv/ChangeLog index f982ea85b61..9d7feba4900 100644 --- a/sim/testsuite/riscv/ChangeLog +++ b/sim/testsuite/riscv/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/riscv/allinsn.exp b/sim/testsuite/riscv/allinsn.exp index 5701391da83..03bec1b541e 100644 --- a/sim/testsuite/riscv/allinsn.exp +++ b/sim/testsuite/riscv/allinsn.exp @@ -1,10 +1,6 @@ # RISC-V simulator testsuite. if [istarget riscv*-*] { - # Used to locate the `run` program. - global arch - set arch "riscv" - # all machines set all_machs "riscv" diff --git a/sim/testsuite/sh/ChangeLog b/sim/testsuite/sh/ChangeLog index 3351f5f932d..0e1f20060f4 100644 --- a/sim/testsuite/sh/ChangeLog +++ b/sim/testsuite/sh/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsn.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsn.exp: Define arch. diff --git a/sim/testsuite/sh/allinsn.exp b/sim/testsuite/sh/allinsn.exp index 235a40c692a..40d13929942 100644 --- a/sim/testsuite/sh/allinsn.exp +++ b/sim/testsuite/sh/allinsn.exp @@ -13,10 +13,6 @@ foreach opt $board_variant_list { } if [istarget sh-*elf] { - # Used to locate the `run` program. - global arch - set arch "sh" - run_sim_test add.s $all run_sim_test and.s $all run_sim_test bandor.s sh diff --git a/sim/testsuite/v850/ChangeLog b/sim/testsuite/v850/ChangeLog index 24933c53a97..5e9ddbe5bed 100644 --- a/sim/testsuite/v850/ChangeLog +++ b/sim/testsuite/v850/ChangeLog @@ -1,3 +1,7 @@ +2021-04-08 Mike Frysinger + + * allinsns.exp (arch): Delete. + 2021-02-13 Mike Frysinger * allinsns.exp: Define arch. diff --git a/sim/testsuite/v850/allinsns.exp b/sim/testsuite/v850/allinsns.exp index 4c3bc088ff6..93dcffce2f3 100644 --- a/sim/testsuite/v850/allinsns.exp +++ b/sim/testsuite/v850/allinsns.exp @@ -3,10 +3,6 @@ if [istarget v850*-*] { global opt - # Used to locate the `run` program. - global arch - set arch "v850" - # all machines switch -regexp -- $opt { .*v850e.* { -- 2.30.2