Use python script to silence the expected testcase fails on 32bit platform.

llvm-svn: 153644
This commit is contained in:
Hongbin Zheng 2012-03-29 13:10:10 +00:00
parent 8619c37b5b
commit e53bdfe633
2 changed files with 7 additions and 9 deletions

View File

@ -33,14 +33,6 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR)
set(POLLY_LIB_DIR "${LLVM_LIBS_DIR}")
endif (NOT DEFINED LLVM_MAIN_SRC_DIR)
MESSAGE(${TARGET_TRIPLE})
if (${TARGET_TRIPLE} MATCHES "^x86_64*")
set(EAT_ERR_ON_X86 " ")
else (${TARGET_TRIPLE} MATCHES "^x86_64*")
# Don't fail the command line
set(EAT_ERR_ON_X86 "|| echo \"error is eaten\"")
endif (${TARGET_TRIPLE} MATCHES "^x86_64*")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)

View File

@ -9,6 +9,12 @@ config.polly_lib_dir = "@POLLY_LIB_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
lit.params['build_config'] = "@POLLY_SOURCE_DIR@/test"
## Check the current platform with regex
import re
EAT_ERR_ON_X86 = ' '
if (re.match(r'^x86_64*', '@TARGET_TRIPLE@') == None) :
EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
try:
@ -22,7 +28,7 @@ config.substitutions.append(('%loadPolly', '-load '
+ config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'))
config.substitutions.append(('%defaultOpts', ' -basicaa -polly-prepare -polly-region-simplify -scev-aa '))
config.substitutions.append(('%polybenchOpts', ' -O3 -loop-simplify -indvars '))
config.substitutions.append(('%EatErrOnX86', '@EAT_ERR_ON_X86@'))
config.substitutions.append(('%EatErrOnX86', EAT_ERR_ON_X86))
# Let the main config do the real work.
lit.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")