aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/arm
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-21 03:41:39 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-26 19:48:05 -0500
commitc0d6a6e5828882040bbb55bafea6b188a18fc000 (patch)
treed8cf4615c587d48caa174be280f30eb622d167b7 /sim/testsuite/arm
parent4c721b266fdae6e2761cc122fac4cfb42932e295 (diff)
downloadbinutils-c0d6a6e5828882040bbb55bafea6b188a18fc000.zip
binutils-c0d6a6e5828882040bbb55bafea6b188a18fc000.tar.gz
binutils-c0d6a6e5828882040bbb55bafea6b188a18fc000.tar.bz2
sim: testsuite: rework sim_init usage
The sim_init function was called by runtest for each test when --tool was set to sim. When we changed to --tool '' to collapse the testsuite dir, the init function was no longer called on every test. However, it was still being called explicitly by config/default.exp. It's not clear why that explicit call ever existed since, in the past, it meant it was redundant. Lets drop the single sim_init call in config/default.exp and move it out to all our tests. This replicates the runtest behavior so we can setup variables on a per-test basis which allows us to recollapse the sim_path logic back. We'll also leverage this in the future for toolchain setup. Also add a few comments clarifying the overall runtime behavior.
Diffstat (limited to 'sim/testsuite/arm')
-rw-r--r--sim/testsuite/arm/allinsn.exp2
-rw-r--r--sim/testsuite/arm/iwmmxt/iwmmxt.exp2
-rw-r--r--sim/testsuite/arm/misc.exp2
-rw-r--r--sim/testsuite/arm/thumb/allthumb.exp2
-rw-r--r--sim/testsuite/arm/xscale/xscale.exp2
5 files changed, 10 insertions, 0 deletions
diff --git a/sim/testsuite/arm/allinsn.exp b/sim/testsuite/arm/allinsn.exp
index 4f4f438..ef41c95 100644
--- a/sim/testsuite/arm/allinsn.exp
+++ b/sim/testsuite/arm/allinsn.exp
@@ -1,5 +1,7 @@
# ARM simulator testsuite.
+sim_init
+
if { [istarget arm*-*-*] } {
# all machines
set all_machs "xscale"
diff --git a/sim/testsuite/arm/iwmmxt/iwmmxt.exp b/sim/testsuite/arm/iwmmxt/iwmmxt.exp
index 058e9e6..7283a42 100644
--- a/sim/testsuite/arm/iwmmxt/iwmmxt.exp
+++ b/sim/testsuite/arm/iwmmxt/iwmmxt.exp
@@ -1,5 +1,7 @@
# Intel(r) Wireless MMX(tm) technology simulator testsuite.
+sim_init
+
if { [istarget arm*-*-*] } {
# all machines
set all_machs "xscale"
diff --git a/sim/testsuite/arm/misc.exp b/sim/testsuite/arm/misc.exp
index 818ee58..0b939a6 100644
--- a/sim/testsuite/arm/misc.exp
+++ b/sim/testsuite/arm/misc.exp
@@ -1,5 +1,7 @@
# Miscellaneous ARM simulator testcases
+sim_init
+
if { [istarget arm*-*-*] } {
# all machines
set all_machs "arm7tdmi"
diff --git a/sim/testsuite/arm/thumb/allthumb.exp b/sim/testsuite/arm/thumb/allthumb.exp
index ec09a0d..76aac93 100644
--- a/sim/testsuite/arm/thumb/allthumb.exp
+++ b/sim/testsuite/arm/thumb/allthumb.exp
@@ -1,5 +1,7 @@
# ARM simulator testsuite.
+sim_init
+
if { [istarget arm*-*-*] } {
# all machines
set all_machs "arm7tdmi"
diff --git a/sim/testsuite/arm/xscale/xscale.exp b/sim/testsuite/arm/xscale/xscale.exp
index 394e351..17e99c3 100644
--- a/sim/testsuite/arm/xscale/xscale.exp
+++ b/sim/testsuite/arm/xscale/xscale.exp
@@ -1,5 +1,7 @@
# XSCALE simulator testsuite.
+sim_init
+
if { [istarget arm*-*-*] } {
# all machines
set all_machs "xscale"