From e7ed09d88e2aff7fca908cec63a4942d16f12830 Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Tue, 19 Jul 2016 09:49:12 -0700 Subject: [PATCH 1/2] Make sure a test that has never run on any platform continues to never run on any platforms. --- test/IRGen/autolink_elf.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/test/IRGen/autolink_elf.swift b/test/IRGen/autolink_elf.swift index 23dba75522cec..4b5d51cd04522 100644 --- a/test/IRGen/autolink_elf.swift +++ b/test/IRGen/autolink_elf.swift @@ -3,6 +3,7 @@ // RUN: %swift -target x86_64-unknown-linux-gnu -emit-module -parse-stdlib -o %t -module-name Empty -module-link-name swiftEmpty %S/../Inputs/empty.swift // RUN: %swift -target x86_64-unknown-linux-gnu %s -I %t -parse-stdlib -disable-objc-interop -module-name main -emit-ir -o - | FileCheck %s +// REQUIRES: SR2116 // REQUIRES: X86 import Empty From aa708ea138a8ccc1faf7de7b1d2902c81af32585 Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Sun, 17 Jul 2016 23:52:32 -0700 Subject: [PATCH 2/2] [lit] Rename config.targets_to_build => config.llvm_code_generators and allow it to actually take on a value. Previously this variable was always just "". Now using the recent cmake changes that I made, we can just grab the proper values from LLVMConfig.cmake. I need this so that we can REQUIRES tests based on the code generators that LLVM was compiled with. To make it easy to show the dependency in the requires line, the requires pattern to use is: REQUIRES: CODEGENERATOR=... --- test/lit.cfg | 4 ++-- test/lit.site.cfg.in | 2 +- validation-test/lit.site.cfg.in | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/lit.cfg b/test/lit.cfg index 3a66b0e24c9de..f2d6349a673d6 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -423,8 +423,8 @@ if platform.system() != 'Windows': config.available_features.add('crash-recovery') # Add each available build target CPU as a feature. -for target in config.targets_to_build.split(): - config.available_features.add(target) +for target in config.llvm_code_generators: + config.available_features.add("CODEGENERATOR=" + target) # Add the run target CPU, OS, and pointer size as features. config.available_features.add("CPU=" + run_cpu) diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 25f357a97999b..91c985a83cc04 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -20,11 +20,11 @@ config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvm_libs_dir = "@LLVM_LIBS_DIR@" +config.llvm_code_generators = "@LLVM_TARGETS_TO_BUILD@".split(";") config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.swift_src_root = lit_config.params.get("swift_src_root", "@SWIFT_SOURCE_DIR@") config.swift_obj_root = "@SWIFT_BINARY_DIR@" config.target_triple = "@TARGET_TRIPLE@" -config.targets_to_build = "@TARGETS_TO_BUILD@" config.variant_triple = "@VARIANT_TRIPLE@" config.variant_sdk = "@VARIANT_SDK@" config.variant_suffix = "@VARIANT_SUFFIX@" diff --git a/validation-test/lit.site.cfg.in b/validation-test/lit.site.cfg.in index 6f1ffcd58854b..32ef45118657f 100644 --- a/validation-test/lit.site.cfg.in +++ b/validation-test/lit.site.cfg.in @@ -19,11 +19,11 @@ config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvm_libs_dir = "@LLVM_LIBS_DIR@" +config.llvm_code_generators = "@LLVM_TARGETS_TO_BUILD@".split(";") config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.swift_src_root = "@SWIFT_SOURCE_DIR@" config.swift_obj_root = "@SWIFT_BINARY_DIR@" config.target_triple = "@TARGET_TRIPLE@" -config.targets_to_build = "@TARGETS_TO_BUILD@" config.variant_triple = "@VARIANT_TRIPLE@" config.variant_suffix = "@VARIANT_SUFFIX@" config.variant_sdk = "@VARIANT_SDK@"