summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAmaury de la Vieuville <amaury.dlv@gmail.com>2013-09-13 11:02:31 +0000
committerAmaury de la Vieuville <amaury.dlv@gmail.com>2013-09-13 11:02:31 +0000
commit7681afdff07f2b455682ef04b4f487ba806ae99e (patch)
tree8803268b1ac0da1602772077f8ebb31920345be3 /clang/test
parent8f0b7feb4c84d8d7ccf4eec7fe51d210f1a08dda (diff)
downloadbcm5719-llvm-7681afdff07f2b455682ef04b4f487ba806ae99e.tar.gz
bcm5719-llvm-7681afdff07f2b455682ef04b4f487ba806ae99e.zip
Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests
Patch by Artyom Skrobov! llvm-svn: 190681
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/cindex-from-source.m2
-rw-r--r--clang/test/Index/complete-pch.m2
-rw-r--r--clang/test/lit.cfg4
-rw-r--r--clang/test/lit.site.cfg.in1
4 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/Index/cindex-from-source.m b/clang/test/Index/cindex-from-source.m
index f226e453353..504d90fd2bc 100644
--- a/clang/test/Index/cindex-from-source.m
+++ b/clang/test/Index/cindex-from-source.m
@@ -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
diff --git a/clang/test/Index/complete-pch.m b/clang/test/Index/complete-pch.m
index 517d49c6351..4c29f2796b5 100644
--- a/clang/test/Index/complete-pch.m
+++ b/clang/test/Index/complete-pch.m
@@ -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
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg
index d23a40c79b7..3b1c2c1f81d 100644
--- a/clang/test/lit.cfg
+++ b/clang/test/lit.cfg
@@ -256,6 +256,10 @@ if not platform.system() in ['Windows'] or not execute_external:
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)
diff --git a/clang/test/lit.site.cfg.in b/clang/test/lit.site.cfg.in
index 1b0b09ae96f..9a4fa33cdc1 100644
--- a/clang/test/lit.site.cfg.in
+++ b/clang/test/lit.site.cfg.in
@@ -13,6 +13,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
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.
OpenPOWER on IntegriCloud