]> granicus.if.org Git - llvm/commitdiff
Add system-linux to allow tests run with llvm-lit to restrict themselves to linux
authorJake Ehrlich <jakehehrlich@google.com>
Wed, 1 Nov 2017 00:18:51 +0000 (00:18 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Wed, 1 Nov 2017 00:18:51 +0000 (00:18 +0000)
I need a test that only runs in a reasonable amount of time on systems
that have sparse files. The broadest class of systems that support
sparse files are linux systems. So restricting my test to linux systems
should suffice. This change adds the system-linux feature to llvm-lit so
that it can be required.

Differential Revision: https://reviews.llvm.org/D39482

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

utils/lit/lit/llvm/config.py

index d9e5f88556b1ba209ad989862f5ad459201a3bfb..798f08af1bee9036de92634d445d606d6303fde5 100644 (file)
@@ -45,14 +45,16 @@ class LLVMConfig(object):
             features.add('shell')
 
         # Running on Darwin OS
-        if platform.system() in ['Darwin']:
+        if platform.system() == 'Darwin':
             # FIXME: lld uses the first, other projects use the second.
             # We should standardize on the former.
             features.add('system-linker-mach-o')
             features.add('system-darwin')
-        elif platform.system() in ['Windows']:
+        elif platform.system() == 'Windows':
             # For tests that require Windows to run.
             features.add('system-windows')
+        elif platform.system() == "Linux":
+            features.add('system-linux')
 
         # Native compilation: host arch == default triple arch
         # Both of these values should probably be in every site config (e.g. as