aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite')
-rw-r--r--sim/testsuite/ChangeLog7
-rw-r--r--sim/testsuite/Makefile.in2
-rwxr-xr-xsim/testsuite/configure116
-rw-r--r--sim/testsuite/configure.ac8
-rw-r--r--sim/testsuite/lib/sim-defs.exp9
-rw-r--r--sim/testsuite/sim/mips/ChangeLog4
-rw-r--r--sim/testsuite/sim/mips/basic.exp5
7 files changed, 134 insertions, 17 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 5142221..dac320f 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (arch): Set to @sim_arch@.
+ * configure.ac: Delete arch logic and include ../configure.tgt.
+ * configure: Regenerated.
+ * lib/sim-defs.exp (sim_run): Default sim to ../arch/run.
+
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/testsuite/Makefile.in b/sim/testsuite/Makefile.in
index 6a60f95..bfb721d 100644
--- a/sim/testsuite/Makefile.in
+++ b/sim/testsuite/Makefile.in
@@ -30,7 +30,7 @@ target_canonical = @target@
target_alias = @target_alias@
program_transform_name = @program_transform_name@
-arch = @arch@
+arch = @sim_arch@
SHELL = /bin/sh
SUBDIRS = @subdirs@
diff --git a/sim/testsuite/configure b/sim/testsuite/configure
index 03db937..da7967e 100755
--- a/sim/testsuite/configure
+++ b/sim/testsuite/configure
@@ -554,7 +554,7 @@ ac_unique_file="common/bits-tst.c"
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
-arch
+sim_arch
subdirs
target_os
target_vendor
@@ -1808,14 +1808,118 @@ subdirs="$subdirs frv-elf"
;;
esac
-# Compute the target architecture.
-# FIXME: Will need to canonicalize some values.
-# FIXME: Should be in generally accessable place.
-case $target in
- *) arch=${target_cpu} ;;
+
+# WHEN ADDING ENTRIES TO THIS MATRIX:
+
+# Make sure that the left side always has two dashes. Otherwise you
+# can get spurious matches. Even for unambiguous cases, do this as a
+# convention, else the table becomes a real mess to understand and
+# maintain.
+
+
+
+sim_testsuite=no
+sim_common=yes
+sim_igen=no
+sim_arch=
+case "${target}" in
+ arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*)
+ sim_arch=arm
+ sim_testsuite=yes
+ ;;
+ avr*-*-*)
+ sim_arch=avr
+ ;;
+ cr16*-*-*)
+ sim_arch=cr16
+ sim_testsuite=yes
+ ;;
+ cris-*-* | crisv32-*-*)
+ sim_arch=cris
+ sim_testsuite=yes
+ ;;
+ d10v-*-*)
+ sim_arch=d10v
+ ;;
+ frv-*-*)
+ sim_arch=frv
+ sim_testsuite=yes
+ ;;
+ h8300*-*-*)
+ sim_arch=h8300
+ sim_testsuite=yes
+ ;;
+ iq2000-*-*)
+ sim_arch=iq2000
+ sim_testsuite=yes
+ ;;
+ lm32-*-*)
+ sim_arch=lm32
+ sim_testsuite=yes
+ ;;
+ m32c-*-*)
+ sim_arch=m32c
+ ;;
+ m32r-*-*)
+ sim_arch=m32r
+ sim_testsuite=yes
+ ;;
+ m68hc11-*-*|m6811-*-*)
+ sim_arch=m68hc11
+ sim_testsuite=yes
+ ;;
+ mcore-*-*)
+ sim_arch=mcore
+ sim_testsuite=yes
+ ;;
+ microblaze-*-*)
+ sim_arch=microblaze
+ sim_testsuite=yes
+ ;;
+ mips*-*-*)
+ sim_arch=mips
+ sim_testsuite=yes
+ sim_igen=yes
+ ;;
+ mn10300*-*-*)
+ sim_arch=mn10300
+ sim_igen=yes
+ ;;
+ moxie-*-*)
+ sim_arch=moxie
+ sim_testsuite=yes
+ ;;
+ rx-*-*)
+ sim_arch=rx
+ ;;
+ sh64*-*-*)
+ sim_arch=sh64
+ sim_testsuite=yes
+ ;;
+ sh*-*-*)
+ sim_arch=sh
+ sim_testsuite=yes
+ ;;
+ sparc-*-rtems*|sparc-*-elf*)
+ sim_arch=erc32
+ sim_testsuite=yes
+ ;;
+ powerpc*-*-*)
+ sim_arch=ppc
+ ;;
+ v850*-*-*)
+ sim_arch=v850
+ sim_igen=yes
+ sim_testsuite=yes
+ ;;
+ *)
+ # No simulator subdir, so the subdir "common" isn't needed.
+ sim_common=no
+ ;;
esac
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
diff --git a/sim/testsuite/configure.ac b/sim/testsuite/configure.ac
index ceaf4ff..ba17a33 100644
--- a/sim/testsuite/configure.ac
+++ b/sim/testsuite/configure.ac
@@ -25,12 +25,6 @@ case ${target} in
;;
esac
-# Compute the target architecture.
-# FIXME: Will need to canonicalize some values.
-# FIXME: Should be in generally accessable place.
-case $target in
- *) arch=${target_cpu} ;;
-esac
-AC_SUBST(arch)
+sinclude(../configure.tgt)
AC_OUTPUT(Makefile)
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 3cef394..1e65817 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -88,6 +88,15 @@ proc sim_run { prog sim_opts prog_opts redir options } {
verbose "testcase timeout is set to $testcase_timeout" 1
set sim [board_info target sim]
+ if [string equal "" $sim] {
+ # Special case the simulator. These tests are designed to
+ # be run inside of the simulator, not on the native host.
+ # So if the sim target isn't set, default to the target run.
+ # These global variables come from generated site.exp.
+ global objdir
+ global arch
+ set sim "$objdir/../$arch/run"
+ }
if [is_remote host] {
set prog [remote_download host $prog]
diff --git a/sim/testsuite/sim/mips/ChangeLog b/sim/testsuite/sim/mips/ChangeLog
index 4bb18b1..99a3121 100644
--- a/sim/testsuite/sim/mips/ChangeLog
+++ b/sim/testsuite/sim/mips/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-26 Mike Frysinger <vapier@gentoo.org>
+
+ * basic.exp: Delete sim target check.
+
2007-08-27 Joel Brobecker <brobecker@adacore.com>
* testutils.inc: Change license to GPL version 3.
diff --git a/sim/testsuite/sim/mips/basic.exp b/sim/testsuite/sim/mips/basic.exp
index 14181c7..15caecc 100644
--- a/sim/testsuite/sim/mips/basic.exp
+++ b/sim/testsuite/sim/mips/basic.exp
@@ -32,9 +32,8 @@ proc run_hilo_test {testfile models nops} {
}
-# Only test mips*-*-elf (e.g., no mips*-*-linux), and only test if the target
-# board really is a simulator (sim tests don't work on real HW).
-if {[istarget mips*-*-elf] && [board_info target exists is_simulator]} {
+# Only test mips*-*-elf (e.g., no mips*-*-linux)
+if {[istarget mips*-*-elf]} {
set dspmodels ""
set mdmxmodels ""