[PATCH] sim: testsuite: push $arch out to targets

Mike Frysinger via Gdb-patches
2021-01-17T16:09:53Z

This is needed to move to automake & its dejagnu-provided logic,
and eventually by the unified sim logic.
---
sim/configure | 2 --
sim/configure.tgt | 1 -
sim/testsuite/Makefile.in | 3 ---
sim/testsuite/aarch64/allinsn.exp | 4 ++++
sim/testsuite/arm/allinsn.exp | 5 +++--
sim/testsuite/arm/iwmmxt/iwmmxt.exp | 5 +++--
sim/testsuite/arm/misc.exp | 5 +++--
sim/testsuite/arm/thumb/allthumb.exp | 5 +++--
sim/testsuite/arm/xscale/xscale.exp | 5 +++--
sim/testsuite/avr/allinsn.exp | 4 ++++
sim/testsuite/bfin/allinsn.exp | 4 ++++
sim/testsuite/bpf/allinsn.exp | 4 ++++
sim/testsuite/cr16/allinsn.exp | 5 +++--
sim/testsuite/cr16/misc.exp | 5 +++--
sim/testsuite/cris/asm/asm.exp | 4 ++++
sim/testsuite/cris/c/c.exp | 4 ++++
sim/testsuite/cris/hw/rv-n-cris/rvc.exp | 4 ++++
sim/testsuite/d10v/allinsn.exp | 6 ++++--
sim/testsuite/frv/allinsn.exp | 6 ++++--
sim/testsuite/frv/fr400/allinsn.exp | 6 ++++--
sim/testsuite/frv/fr500/allinsn.exp | 6 ++++--
sim/testsuite/frv/fr550/allinsn.exp | 6 ++++--
sim/testsuite/frv/interrupts.exp | 6 ++++--
sim/testsuite/frv/misc.exp | 6 ++++--
sim/testsuite/frv/parallel.exp | 6 ++++--
sim/testsuite/ft32/allinsn.exp | 4 ++++
sim/testsuite/h8300/allinsn.exp | 4 ++++
sim/testsuite/iq2000/allinsn.exp | 4 ++++
sim/testsuite/lm32/allinsn.exp | 4 ++++
sim/testsuite/m32c/allinsn.exp | 4 ++++
sim/testsuite/m32r/allinsn.exp | 5 +++--
sim/testsuite/m32r/misc.exp | 5 +++--
sim/testsuite/m68hc11/allinsn.exp | 4 ++++
sim/testsuite/mcore/allinsn.exp | 4 ++++
sim/testsuite/microblaze/allinsn.exp | 4 ++++
sim/testsuite/mips/basic.exp | 3 +++
sim/testsuite/mn10300/allinsn.exp | 4 ++++
sim/testsuite/moxie/allinsn.exp | 4 ++++
sim/testsuite/msp430/allinsn.exp | 4 ++++
sim/testsuite/or1k/alltests.exp | 3 +++
sim/testsuite/pru/allinsn.exp | 4 ++++
sim/testsuite/sh/allinsn.exp | 4 ++++
sim/testsuite/v850/allinsns.exp | 8 ++++----
43 files changed, 149 insertions(+), 44 deletions(-)

diff --git a/sim/configure b/sim/configure
index 7093cb1f1cf6..92ea56e318a2 100755
--- a/sim/configure
+++ b/sim/configure
@@ -585,7 +585,6 @@ ac_unique_file="Makefile.in"
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
-sim_arch
subdirs
CFLAGS_FOR_BUILD
CC_FOR_BUILD
@@ -3904,7 +3903,6 @@ subdirs="$subdirs aarch64"
;;
esac

-
if test "$sim_igen" = yes; then
subdirs="$subdirs igen"

diff --git a/sim/configure.tgt b/sim/configure.tgt
index a48c6966e8ae..800bc3de42f5 100644
--- a/sim/configure.tgt
+++ b/sim/configure.tgt
@@ -108,4 +108,3 @@ case "${target}" in
sim_igen=yes
;;
esac
-AC_SUBST(sim_arch)
diff --git a/sim/testsuite/Makefile.in b/sim/testsuite/Makefile.in
index 1e4604cea68c..8db77d2d46f2 100644
--- a/sim/testsuite/Makefile.in
+++ b/sim/testsuite/Makefile.in
@@ -29,8 +29,6 @@ target_canonical = @target@
target_alias = @target_alias@
program_transform_name = @program_transform_name@

-arch = @sim_arch@
-
SHELL = /bin/sh
SUBDIRS = @subdirs@
RPATH_ENVVAR = @RPATH_ENVVAR@
@@ -129,7 +127,6 @@ site.exp: Makefile
@echo '# edit the last section' >> $@-t
@echo 'set srcdir $(srcdir)' >> $@-t
@echo 'set objdir' `pwd` >> $@-t
- @echo 'set arch $(arch)' >> $@-t
@echo 'set build_alias $(build_alias)' >> $@-t
@echo 'set build_triplet $(build_canonical)' >> $@-t
@echo 'set host_alias $(host_alias)' >> $@-t
diff --git a/sim/testsuite/aarch64/allinsn.exp b/sim/testsuite/aarch64/allinsn.exp
index 54d64784c230..04a234f53577 100644
--- a/sim/testsuite/aarch64/allinsn.exp
+++ b/sim/testsuite/aarch64/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/arm/allinsn.exp
index 9752da615ac3..89ff96594793 100644
--- a/sim/testsuite/arm/allinsn.exp
+++ b/sim/testsuite/arm/allinsn.exp
@@ -1,8 +1,9 @@
# ARM simulator testsuite.

if { [istarget arm*-*-*] } {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 4def69031a90..9710f3670ba7 100644
--- a/sim/testsuite/arm/iwmmxt/iwmmxt.exp
+++ b/sim/testsuite/arm/iwmmxt/iwmmxt.exp
@@ -1,8 +1,9 @@
# Intel(r) Wireless MMX(tm) technology simulator testsuite.

if { [istarget arm*-*-*] } {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 bc36ca87368b..ea6fd3c3c9a0 100644
--- a/sim/testsuite/arm/misc.exp
+++ b/sim/testsuite/arm/misc.exp
@@ -1,8 +1,9 @@
# Miscellaneous ARM simulator testcases

if { [istarget arm*-*-*] } {
- # load support procs
- # load_lib cgen.exp
+ # 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 4298663fd813..eca5fa18c719 100644
--- a/sim/testsuite/arm/thumb/allthumb.exp
+++ b/sim/testsuite/arm/thumb/allthumb.exp
@@ -1,8 +1,9 @@
# ARM simulator testsuite.

if { [istarget arm*-*-*] } {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 7c08f11d10d6..20c9df80351c 100644
--- a/sim/testsuite/arm/xscale/xscale.exp
+++ b/sim/testsuite/arm/xscale/xscale.exp
@@ -1,8 +1,9 @@
# XSCALE simulator testsuite.

if { [istarget arm*-*-*] } {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # Used to locate the `run` program.
+ global arch
+ set arch "arm"

# all machines
set all_machs "xscale"
diff --git a/sim/testsuite/avr/allinsn.exp b/sim/testsuite/avr/allinsn.exp
index 584a93da9305..a5c16b629b76 100644
--- a/sim/testsuite/avr/allinsn.exp
+++ b/sim/testsuite/avr/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/bfin/allinsn.exp
index aa304eaa9b4a..3d3378171c6d 100644
--- a/sim/testsuite/bfin/allinsn.exp
+++ b/sim/testsuite/bfin/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/bpf/allinsn.exp
index 2cca77021afe..ffffd8a68928 100644
--- a/sim/testsuite/bpf/allinsn.exp
+++ b/sim/testsuite/bpf/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/cr16/allinsn.exp
index 852a673c3601..1b6847c78150 100644
--- a/sim/testsuite/cr16/allinsn.exp
+++ b/sim/testsuite/cr16/allinsn.exp
@@ -1,8 +1,9 @@
# CR16 simulator testsuite.

if [istarget cr16*-*-*] {
- # load support procs
- # load_lib cgen.exp
+ # 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 39dd3a4caa3c..67fa4c2d7d38 100644
--- a/sim/testsuite/cr16/misc.exp
+++ b/sim/testsuite/cr16/misc.exp
@@ -1,8 +1,9 @@
# Miscellaneous CR16 simulator testcases

if [istarget cr16*-*-*] {
- # load support procs
- # load_lib cgen.exp
+ # Used to locate the `run` program.
+ global arch
+ set arch "cr16"

# all machines
set all_machs "cr16"
diff --git a/sim/testsuite/cris/asm/asm.exp b/sim/testsuite/cris/asm/asm.exp
index 415bbf1082a9..b8c14c8d05cb 100644
--- a/sim/testsuite/cris/asm/asm.exp
+++ b/sim/testsuite/cris/asm/asm.exp
@@ -16,6 +16,10 @@
# 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 08ea18812ec5..3d493b7c1449 100644
--- a/sim/testsuite/cris/c/c.exp
+++ b/sim/testsuite/cris/c/c.exp
@@ -19,6 +19,10 @@ 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 0f9ecec32a26..0a018fa4b881 100644
--- a/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
+++ b/sim/testsuite/cris/hw/rv-n-cris/rvc.exp
@@ -112,6 +112,10 @@ 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
diff --git a/sim/testsuite/d10v/allinsn.exp b/sim/testsuite/d10v/allinsn.exp
index 123509a3b990..e2e44a290920 100644
--- a/sim/testsuite/d10v/allinsn.exp
+++ b/sim/testsuite/d10v/allinsn.exp
@@ -1,8 +1,10 @@
# d10v simulator testsuite.

if [istarget d10v*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # Used to locate the `run` program.
+ global arch
+ set arch "d10v"
+
# all machines
set all_machs "d10v"

diff --git a/sim/testsuite/frv/allinsn.exp b/sim/testsuite/frv/allinsn.exp
index b7f9fe2ad06c..2633f30df567 100644
--- a/sim/testsuite/frv/allinsn.exp
+++ b/sim/testsuite/frv/allinsn.exp
@@ -1,8 +1,10 @@
# FRV simulator testsuite.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 b1697610403c..ea5846f8fa42 100644
--- a/sim/testsuite/frv/fr400/allinsn.exp
+++ b/sim/testsuite/frv/fr400/allinsn.exp
@@ -1,8 +1,10 @@
# FRV simulator testsuite.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 7d192593efb5..40caa6307060 100644
--- a/sim/testsuite/frv/fr500/allinsn.exp
+++ b/sim/testsuite/frv/fr500/allinsn.exp
@@ -1,8 +1,10 @@
# FRV simulator testsuite.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 1fe17952de1a..8768a6719946 100644
--- a/sim/testsuite/frv/fr550/allinsn.exp
+++ b/sim/testsuite/frv/fr550/allinsn.exp
@@ -1,8 +1,10 @@
# FRV simulator testsuite.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 e31533e10533..d1f7628d962d 100644
--- a/sim/testsuite/frv/interrupts.exp
+++ b/sim/testsuite/frv/interrupts.exp
@@ -1,8 +1,10 @@
# FRV simulator testsuite.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 4245a81cb60a..d9c80a546000 100644
--- a/sim/testsuite/frv/misc.exp
+++ b/sim/testsuite/frv/misc.exp
@@ -1,8 +1,10 @@
# Miscellaneous FRV simulator testcases.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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 8101a67afb59..a883b9891d5d 100644
--- a/sim/testsuite/frv/parallel.exp
+++ b/sim/testsuite/frv/parallel.exp
@@ -1,8 +1,10 @@
# FRV simulator testsuite.

if [istarget frv*-*] {
- # load support procs (none yet)
- # load_lib cgen.exp
+ # 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/allinsn.exp b/sim/testsuite/ft32/allinsn.exp
index 730b4223632d..50827a592473 100644
--- a/sim/testsuite/ft32/allinsn.exp
+++ b/sim/testsuite/ft32/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/h8300/allinsn.exp
index 68468f6bb106..5355bf58a69d 100644
--- a/sim/testsuite/h8300/allinsn.exp
+++ b/sim/testsuite/h8300/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/iq2000/allinsn.exp
index 38eee9b277f1..96d58435fb45 100644
--- a/sim/testsuite/iq2000/allinsn.exp
+++ b/sim/testsuite/iq2000/allinsn.exp
@@ -1,6 +1,10 @@
# 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/lm32/allinsn.exp b/sim/testsuite/lm32/allinsn.exp
index 61744985f6c8..ae7c141bd643 100644
--- a/sim/testsuite/lm32/allinsn.exp
+++ b/sim/testsuite/lm32/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/m32c/allinsn.exp
index fb5ccca282e1..b09b505972a3 100644
--- a/sim/testsuite/m32c/allinsn.exp
+++ b/sim/testsuite/m32c/allinsn.exp
@@ -2,6 +2,10 @@
# 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/allinsn.exp b/sim/testsuite/m32r/allinsn.exp
index 8eed80f91d67..a800e78b1b46 100644
--- a/sim/testsuite/m32r/allinsn.exp
+++ b/sim/testsuite/m32r/allinsn.exp
@@ -1,8 +1,9 @@
# M32R simulator testsuite.

if [istarget m32r*-*-*] {
- # load support procs
- # load_lib cgen.exp
+ # 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 6ed5638ab29b..e571c2eeb69d 100644
--- a/sim/testsuite/m32r/misc.exp
+++ b/sim/testsuite/m32r/misc.exp
@@ -1,8 +1,9 @@
# Miscellaneous M32R simulator testcases

if [istarget m32r*-*-*] {
- # load support procs
- # load_lib cgen.exp
+ # Used to locate the `run` program.
+ global arch
+ set arch "m32r"

# all machines
set all_machs "m32r"
diff --git a/sim/testsuite/m68hc11/allinsn.exp b/sim/testsuite/m68hc11/allinsn.exp
index db0cbd5d4670..0e9b51ec5934 100644
--- a/sim/testsuite/m68hc11/allinsn.exp
+++ b/sim/testsuite/m68hc11/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/mcore/allinsn.exp
index 5921cfc26431..ecc934b20146 100644
--- a/sim/testsuite/mcore/allinsn.exp
+++ b/sim/testsuite/mcore/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/microblaze/allinsn.exp
index f756914292c4..5f5a4475eed4 100644
--- a/sim/testsuite/microblaze/allinsn.exp
+++ b/sim/testsuite/microblaze/allinsn.exp
@@ -1,6 +1,10 @@
# 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/basic.exp b/sim/testsuite/mips/basic.exp
index f810741dbb74..2eff923c0fc7 100644
--- a/sim/testsuite/mips/basic.exp
+++ b/sim/testsuite/mips/basic.exp
@@ -42,6 +42,9 @@ 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 ""
diff --git a/sim/testsuite/mn10300/allinsn.exp b/sim/testsuite/mn10300/allinsn.exp
index f8431e7222ea..7166aefddf30 100644
--- a/sim/testsuite/mn10300/allinsn.exp
+++ b/sim/testsuite/mn10300/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/moxie/allinsn.exp
index 1a6af8b37d45..241e67576253 100644
--- a/sim/testsuite/moxie/allinsn.exp
+++ b/sim/testsuite/moxie/allinsn.exp
@@ -1,6 +1,10 @@
# 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/allinsn.exp b/sim/testsuite/msp430/allinsn.exp
index affa8aedc2ad..83030290cce2 100644
--- a/sim/testsuite/msp430/allinsn.exp
+++ b/sim/testsuite/msp430/allinsn.exp
@@ -1,6 +1,10 @@
# 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/alltests.exp b/sim/testsuite/or1k/alltests.exp
index dd08fbcf99b4..98c1345d0be5 100644
--- a/sim/testsuite/or1k/alltests.exp
+++ b/sim/testsuite/or1k/alltests.exp
@@ -16,6 +16,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

if [istarget or1k*-*-*] {
+ # Used to locate the `run` program.
+ global arch
+ set arch "or1k"

set all_machs "or1k"

diff --git a/sim/testsuite/pru/allinsn.exp b/sim/testsuite/pru/allinsn.exp
index d147f731c913..c0d5ce936894 100644
--- a/sim/testsuite/pru/allinsn.exp
+++ b/sim/testsuite/pru/allinsn.exp
@@ -19,6 +19,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

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/sh/allinsn.exp b/sim/testsuite/sh/allinsn.exp
index 40d139299426..235a40c692ab 100644
--- a/sim/testsuite/sh/allinsn.exp
+++ b/sim/testsuite/sh/allinsn.exp
@@ -13,6 +13,10 @@ 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/allinsns.exp b/sim/testsuite/v850/allinsns.exp
index f60c3d66aa46..4c3bc088ff6b 100644
--- a/sim/testsuite/v850/allinsns.exp
+++ b/sim/testsuite/v850/allinsns.exp
@@ -3,10 +3,11 @@
if [istarget v850*-*] {
global opt

- # load support procs (none yet)
- # load_lib cgen.exp
- # all machines
+ # Used to locate the `run` program.
+ global arch
+ set arch "v850"

+ # all machines
switch -regexp -- $opt {
.*v850e.* {
set all_machs "v850e"
@@ -36,4 +37,3 @@ if [istarget v850*-*] {
# }
# puts [format "%-30s %s" $var "[set ::$var]"]
#}
-
\ No newline at end of file
--
2.28.0