Commit 90e99343 authored by Simon Marlow's avatar Simon Marlow
Browse files

grab the target architecture from GHC, and add an if_arch() test

parent 0fb72c5a
......@@ -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 = ''
......
......@@ -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
......
......@@ -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' \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment