From 260ac88cd46ba57ea0c42e37b977d517fd9aa559 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 10 Aug 2016 19:03:18 +0000 Subject: [PATCH] [sancov] Run more sancov tests on non-x86-Linux machines Add the $arch-registered-target features that clang uses to disable tests that require a registered backend, so that we can run the sancov tests on Windows. LLVM's lit suite did not appear to have a per-test way to do this, and I would rather not split up the sancov tests into architecture directories. Split out of https://reviews.llvm.org/D23321 llvm-svn: 278271 --- llvm/test/lit.cfg | 3 +++ llvm/test/tools/sancov/print.test | 2 +- llvm/test/tools/sancov/print_coverage_pcs.test | 2 +- llvm/test/tools/sancov/stats.test | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index daa757e..f9f82d1 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -348,6 +348,9 @@ for pattern in [r"\bllvm-go\b", config.targets = frozenset(config.targets_to_build.split()) +for arch in config.targets_to_build.split(): + config.available_features.add(arch.lower() + '-registered-target') + ### Features # Shell execution diff --git a/llvm/test/tools/sancov/print.test b/llvm/test/tools/sancov/print.test index fe94216..f0520ae 100644 --- a/llvm/test/tools/sancov/print.test +++ b/llvm/test/tools/sancov/print.test @@ -1,4 +1,4 @@ -REQUIRES: x86_64-linux +REQUIRES: x86-registered-target RUN: sancov -print %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s CHECK: 0x4e132b diff --git a/llvm/test/tools/sancov/print_coverage_pcs.test b/llvm/test/tools/sancov/print_coverage_pcs.test index 2756eb0..8a86c4f 100644 --- a/llvm/test/tools/sancov/print_coverage_pcs.test +++ b/llvm/test/tools/sancov/print_coverage_pcs.test @@ -1,4 +1,4 @@ -REQUIRES: x86_64-linux +REQUIRES: x86-registered-target RUN: sancov -print-coverage-pcs %p/Inputs/test-linux_x86_64 | FileCheck %s CHECK: 0x4e132b diff --git a/llvm/test/tools/sancov/stats.test b/llvm/test/tools/sancov/stats.test index 05e712b..eaf33cf 100644 --- a/llvm/test/tools/sancov/stats.test +++ b/llvm/test/tools/sancov/stats.test @@ -1,4 +1,4 @@ -REQUIRES: x86_64-linux +REQUIRES: x86-registered-target RUN: sancov -print-coverage-stats %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s CHECK: all-edges: 9 -- 2.7.4