r190681 - Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests

Amaury de la Vieuville amaury.dlv at gmail.com
Fri Sep 13 04:02:31 PDT 2013


Author: amaury.dlv
Date: Fri Sep 13 06:02:31 2013
New Revision: 190681

URL: http://llvm.org/viewvc/llvm-project?rev=190681&view=rev
Log:
Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests

Patch by Artyom Skrobov!

Modified:
    cfe/trunk/test/Index/cindex-from-source.m
    cfe/trunk/test/Index/complete-pch.m
    cfe/trunk/test/lit.cfg
    cfe/trunk/test/lit.site.cfg.in

Modified: cfe/trunk/test/Index/cindex-from-source.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/cindex-from-source.m?rev=190681&r1=190680&r2=190681&view=diff
==============================================================================
--- cfe/trunk/test/Index/cindex-from-source.m (original)
+++ cfe/trunk/test/Index/cindex-from-source.m Fri Sep 13 06:02:31 2013
@@ -1,4 +1,4 @@
-
+// REQUIRES: native
 // RUN: %clang -x objective-c-header %S/Inputs/cindex-from-source.h -o %t.pfx.h.gch
 // RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t
 // RUN: FileCheck %s < %t

Modified: cfe/trunk/test/Index/complete-pch.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-pch.m?rev=190681&r1=190680&r2=190681&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-pch.m (original)
+++ cfe/trunk/test/Index/complete-pch.m Fri Sep 13 06:02:31 2013
@@ -11,6 +11,8 @@ void msg_id(id x) {
   [x instanceMethod1:5];
 }
 
+// REQUIRES: native
+
 // Build the precompiled header
 // RUN: %clang -x objective-c-header -o %t.h.pch %S/Inputs/complete-pch.h
 

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=190681&r1=190680&r2=190681&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Fri Sep 13 06:02:31 2013
@@ -256,6 +256,10 @@ if not platform.system() in ['Windows']
 if platform.system() not in ['Windows']:
     config.available_features.add('ansi-escape-sequences')
 
+# Native compilation: host arch == target arch
+if config.host_arch in config.target_triple:
+    config.available_features.add("native")
+
 # Case-insensitive file system
 def is_filesystem_case_insensitive():
     handle, path = tempfile.mkstemp(prefix='case-test', dir=config.test_exec_root)

Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=190681&r1=190680&r2=190681&view=diff
==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Fri Sep 13 06:02:31 2013
@@ -13,6 +13,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_S
 config.clang_arcmt = @ENABLE_CLANG_ARCMT@
 config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
 config.clang_rewriter = @ENABLE_CLANG_REWRITER@
+config.host_arch = "@HOST_ARCH@"
 
 # Support substitution of the tools and libs dirs with user parameters. This is
 # used when we can't determine the tool dir at configuration time.





More information about the cfe-commits mailing list