]> granicus.if.org Git - clang/commitdiff
Tie the macOS tests in test/Integration to the latest macOS SDK
authorAlex Lorenz <arphaman@gmail.com>
Fri, 2 Jun 2017 11:26:35 +0000 (11:26 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 2 Jun 2017 11:26:35 +0000 (11:26 +0000)
This change will ensure that these tests won't fail when a new SDK that
utilizes new compiler features is used.
See https://reviews.llvm.org/D32178 for more context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304542 91177308-0d34-0410-b5e6-96231b3b80d8

test/Integration/carbon.c
test/Integration/cocoa-pch.m
test/Integration/cocoa.m
test/lit.cfg

index 0498116dd1817d10cd450a291c5163d52772d483..3cae391226851c706ed107469636c905c76b8dc7 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang -fsyntax-only %s
+// REQUIRES: macos-sdk-10.12
 #ifdef __APPLE__
 #include <Carbon/Carbon.h>
 #endif
index 0159b3201492f7129aece26750ae03d86cd97dfc..fa3ccea37896c3728c215b9c9e59de8862441b5d 100644 (file)
@@ -1,6 +1,7 @@
 // RUN: %clang -arch x86_64 -x objective-c-header %s -o %t.h.pch
 // RUN: touch %t.empty.m
 // RUN: %clang -arch x86_64 -fsyntax-only %t.empty.m -include %t.h -Xclang -ast-dump 2>&1 > /dev/null
+// REQUIRES: macos-sdk-10.12
 #ifdef __APPLE__
 #include <Cocoa/Cocoa.h>
 #endif
index d814b3ee21bcd35ad95d34d0a233e0eabb00b9d2..91d86825084574a3528a8b10cd0a2aa49575c6db 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang -arch x86_64 %s -fsyntax-only -Xclang -print-stats
+// REQUIRES: macos-sdk-10.12
 #ifdef __APPLE__
 #include <Cocoa/Cocoa.h>
 #endif
index a5e8b9de994b145329ce7667cac3276403c64e51..e72eca6bd397be4897589c508854b2e8448e3d8e 100644 (file)
@@ -529,3 +529,6 @@ if run_console_tests != 0:
   config.available_features.add('console')
 
 lit.util.usePlatformSdkOnDarwin(config, lit_config)
+macOSSDKVersion = lit.util.findPlatformSdkVersionOnMacOS(config, lit_config)
+if macOSSDKVersion is not None:
+    config.available_features.add('macos-sdk-' + macOSSDKVersion)