From c0d6a6e5828882040bbb55bafea6b188a18fc000 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 21 Nov 2021 03:41:39 -0500 Subject: 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. --- sim/testsuite/or1k/alltests.exp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sim/testsuite/or1k') diff --git a/sim/testsuite/or1k/alltests.exp b/sim/testsuite/or1k/alltests.exp index 701cca6..6f4238d 100644 --- a/sim/testsuite/or1k/alltests.exp +++ b/sim/testsuite/or1k/alltests.exp @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +sim_init + if [istarget or1k*-*-*] { set all_machs "or1k" -- cgit v1.1