From 4be9b400910d7098f488ff15713b4b44149de8e8 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 25 Feb 2015 20:14:05 +0000 Subject: [PATCH] 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. llvm-svn: 230536 --- compiler-rt/test/cfi/CMakeLists.txt | 6 ++++++ compiler-rt/test/cfi/lit.cfg | 3 +++ 2 files changed, 9 insertions(+) diff --git a/compiler-rt/test/cfi/CMakeLists.txt b/compiler-rt/test/cfi/CMakeLists.txt index f519fb0..5750bd8 100644 --- a/compiler-rt/test/cfi/CMakeLists.txt +++ b/compiler-rt/test/cfi/CMakeLists.txt @@ -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") diff --git a/compiler-rt/test/cfi/lit.cfg b/compiler-rt/test/cfi/lit.cfg index d78820d..204d332 100644 --- a/compiler-rt/test/cfi/lit.cfg +++ b/compiler-rt/test/cfi/lit.cfg @@ -33,3 +33,6 @@ elif sys.platform.startswith('linux') and is_linux_lto_supported(): 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") -- 2.7.4