[llvm] r317055 - Add system-linux to allow tests run with llvm-lit to restrict themselves to linux

Jake Ehrlich via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 17:18:51 PDT 2017


Author: jakehehrlich
Date: Tue Oct 31 17:18:51 2017
New Revision: 317055

URL: http://llvm.org/viewvc/llvm-project?rev=317055&view=rev
Log:
Add system-linux to allow tests run with llvm-lit to restrict themselves to linux

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

Modified:
    llvm/trunk/utils/lit/lit/llvm/config.py

Modified: llvm/trunk/utils/lit/lit/llvm/config.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/llvm/config.py?rev=317055&r1=317054&r2=317055&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py (original)
+++ llvm/trunk/utils/lit/lit/llvm/config.py Tue Oct 31 17:18:51 2017
@@ -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




More information about the llvm-commits mailing list