Make the UBSan coverage-levels.cc test be Linux specific
authorKuba Brecka <kuba.brecka@gmail.com>
Thu, 12 Mar 2015 10:44:34 +0000 (10:44 +0000)
committerKuba Brecka <kuba.brecka@gmail.com>
Thu, 12 Mar 2015 10:44:34 +0000 (10:44 +0000)
Reviewed at http://reviews.llvm.org/D8278

llvm-svn: 232025

compiler-rt/test/ubsan/TestCases/Misc/Linux/coverage-levels.cc [moved from compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cc with 98% similarity]
compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg [new file with mode: 0644]

@@ -14,8 +14,6 @@
 // RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=3  %s -o %t
 // RUN: UBSAN_OPTIONS=$OPT ASAN_OPTIONS=$OPT %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3 --check-prefix=CHECK_WARN
 
-// XFAIL: darwin
-
 volatile int sink;
 int main(int argc, char **argv) {
   int shift = argc * 32;
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg b/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg
new file mode 100644 (file)
index 0000000..57271b8
--- /dev/null
@@ -0,0 +1,9 @@
+def getRoot(config):
+  if not config.parent:
+    return config
+  return getRoot(config.parent)
+
+root = getRoot(config)
+
+if root.host_os not in ['Linux']:
+  config.unsupported = True