diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-11-24 10:12:23 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-11-24 10:12:23 +0000 |
commit | 90e99343b38daf645925b460e93b53252a2b5d49 (patch) | |
tree | 5274a9bfbf392b63f5bc9fd5e147472f95119440 | |
parent | 0fb72c5a2a029a57a0f330610d9eb990e4ccca09 (diff) | |
download | haskell-90e99343b38daf645925b460e93b53252a2b5d49.tar.gz |
grab the target architecture from GHC, and add an if_arch() test
-rw-r--r-- | testsuite/driver/testglobals.py | 1 | ||||
-rw-r--r-- | testsuite/driver/testlib.py | 6 | ||||
-rw-r--r-- | testsuite/mk/test.mk | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index c04605006d..7790480e9a 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -37,6 +37,7 @@ class TestConfig: # What platform are we running on? self.platform = '' self.os = '' + self.arch = '' # What is the wordsize (in bits) of this platform? self.wordsize = '' diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index c7c3435a99..e08769bd47 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -260,6 +260,12 @@ def if_os( os, f ): else: return normal +def if_arch( arch, f ): + if config.arch == arch: + return f + else: + return normal + def if_wordsize( ws, f ): if config.wordsize == str(ws): return f diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index 85367433b3..36756d70ae 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -30,6 +30,7 @@ RUNTEST_OPTS = $(eval $(call get-ghc-rts-field,WORDSIZE,Word size)) $(eval $(call get-ghc-rts-field,TARGETPLATFORM,Target platform)) $(eval $(call get-ghc-rts-field,TargetOS_CPP,Target OS)) +$(eval $(call get-ghc-rts-field,TargetARCH_CPP,Target architecture)) ifeq "$(filter $(TargetOS_CPP), cygwin32 mingw32)" "" exeext = else @@ -106,6 +107,7 @@ RUNTEST_OPTS += \ -e 'config.gs="$(GS)"' \ -e 'config.platform="$(TARGETPLATFORM)"' \ -e 'config.os="$(TargetOS_CPP)"' \ + -e 'config.arch="$(TargetARCH_CPP)"' \ -e 'config.wordsize="$(WORDSIZE)"' \ -e 'default_testopts.cleanup="$(CLEANUP)"' \ -e 'config.timeout=int($(TIMEOUT)) or config.timeout' \ |