mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
c0d6a6e582
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.
27 lines
676 B
Plaintext
27 lines
676 B
Plaintext
# v850 simulator testsuite.
|
|
|
|
sim_init
|
|
|
|
if [istarget v850*-*] {
|
|
# All machines.
|
|
# Should add more cpus if the testsuite adds coverage for their insns, but
|
|
# at the core level, there's no deviation beyond these two.
|
|
set all_machs "v850e v850"
|
|
|
|
# gas doesn't support any '=' option for v850.
|
|
set cpu_option_sep ""
|
|
set cpu_option -m
|
|
|
|
# The .cgs suffix is for "cgen .s".
|
|
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.cgs]] {
|
|
# 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
|
|
}
|
|
|
|
unset cpu_option cpu_option_sep
|
|
}
|