]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/bfin/allinsn.exp
sim: testsuite: push $arch out to targets
[thirdparty/binutils-gdb.git] / sim / testsuite / bfin / allinsn.exp
1 # Analog Devices Blackfin simulator testsuite
2
3 if [istarget bfin-*-elf] {
4 # Used to locate the `run` program.
5 global arch
6 set arch "bfin"
7
8 # all machines
9 set all_machs "bfin"
10
11 # See if we have a preprocessor available.
12 if { [target_compile $srcdir/$subdir/usp.S compilercheck.x "preprocess" \
13 [list "incdir=$srcdir/$subdir"]] == "" } {
14 set has_cpp 1
15 } {
16 verbose -log "Can't execute preprocessor"
17 set has_cpp 0
18 }
19
20 # See if we have a compiler available.
21 if { [target_compile $srcdir/$subdir/argc.c compilercheck.x "executable" \
22 [list "incdir=$srcdir/$subdir" "additional_flags=-msim"]] == "" } {
23 set has_cc 1
24 } {
25 verbose -log "Can't execute C compiler"
26 set has_cc 0
27 }
28
29 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.\[csS\]]] {
30 # If we don't have a compiler available, skip tests :(.
31 if { $has_cpp == 0 && [string match "*.S" $src] } {
32 untested $src
33 continue
34 }
35 if { $has_cc == 0 && [string match "*.c" $src] } {
36 untested $src
37 continue
38 }
39
40 # If we're only testing specific files and this isn't one of them,
41 # skip it.
42 if ![runtest_file_p $runtests $src] {
43 continue
44 }
45 run_sim_test $src $all_machs
46 }
47 }