[compiler-rt] r230536 - CFI: Add a check-cfi-and-supported rule.
Peter Collingbourne
peter at pcc.me.uk
Wed Feb 25 12:14:05 PST 2015
Author: pcc
Date: Wed Feb 25 14:14:05 2015
New Revision: 230536
URL: http://llvm.org/viewvc/llvm-project?rev=230536&view=rev
Log:
CFI: Add a check-cfi-and-supported rule.
This rule works like check-cfi, but fails if the tests are unsupported.
This is useful to run on bots if we want to be sure that the tests aren't
silently being skipped.
Modified:
compiler-rt/trunk/test/cfi/CMakeLists.txt
compiler-rt/trunk/test/cfi/lit.cfg
Modified: compiler-rt/trunk/test/cfi/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/CMakeLists.txt?rev=230536&r1=230535&r2=230536&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/cfi/CMakeLists.txt Wed Feb 25 14:14:05 2015
@@ -20,4 +20,10 @@ endif()
add_lit_testsuite(check-cfi "Running the cfi regression tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CFI_TEST_DEPS})
+
+add_lit_target(check-cfi-and-supported "Running the cfi regression tests"
+ ${CMAKE_CURRENT_BINARY_DIR}
+ PARAMS check_supported=1
+ DEPENDS ${CFI_TEST_DEPS})
+
set_target_properties(check-cfi PROPERTIES FOLDER "Tests")
Modified: compiler-rt/trunk/test/cfi/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/lit.cfg?rev=230536&r1=230535&r2=230536&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/lit.cfg (original)
+++ compiler-rt/trunk/test/cfi/lit.cfg Wed Feb 25 14:14:05 2015
@@ -33,3 +33,6 @@ elif sys.platform.startswith('linux') an
config.substitutions.append((r"%clangxx_cfi ", clangxx + ' -fuse-ld=gold -fsanitize=cfi '))
else:
config.unsupported = True
+
+if lit_config.params.get('check_supported', None) and config.unsupported:
+ raise BaseException("Tests unsupported")
More information about the llvm-commits
mailing list