[llvm-commits] [polly] r153644 - in /polly/trunk/test: CMakeLists.txt lit.site.cfg.in

Hongbin Zheng etherzhhb at gmail.com
Thu Mar 29 06:10:10 PDT 2012


Author: ether
Date: Thu Mar 29 08:10:10 2012
New Revision: 153644

URL: http://llvm.org/viewvc/llvm-project?rev=153644&view=rev
Log:
Use python script to silence the expected testcase fails on 32bit platform.

Modified:
    polly/trunk/test/CMakeLists.txt
    polly/trunk/test/lit.site.cfg.in

Modified: polly/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CMakeLists.txt?rev=153644&r1=153643&r2=153644&view=diff
==============================================================================
--- polly/trunk/test/CMakeLists.txt (original)
+++ polly/trunk/test/CMakeLists.txt Thu Mar 29 08:10:10 2012
@@ -33,14 +33,6 @@
   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)

Modified: polly/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.site.cfg.in?rev=153644&r1=153643&r2=153644&view=diff
==============================================================================
--- polly/trunk/test/lit.site.cfg.in (original)
+++ polly/trunk/test/lit.site.cfg.in Thu Mar 29 08:10:10 2012
@@ -9,6 +9,12 @@
 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.polly_lib_dir + '/LLVMPolly at 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")





More information about the llvm-commits mailing list