summaryrefslogtreecommitdiff
path: root/test/lit.common.cfg
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-03-30 13:33:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-03-30 13:33:22 +0000
commit4aad00e01cdb286aab2c326c6c03c4674ce7e402 (patch)
tree009efd56c3bcd833ce5122962d46d480b1bed8d8 /test/lit.common.cfg
parent7b09945185c7f9173ac183715e6fa6b74ff2e79a (diff)
Add LIT_USE_INTERNAL_SHELL to compiler-rt tests.
I am working on improving our internal bot infrastructure. One thing that is unique to the ps4 is that we want to run the posix tests, but have to execute them on windows. We currently have a local hack to use a shell on windows, but it is pretty much impossible to get all all the tools to play nice with all the heuristics for what is a path and what is a command line option. This adds support LIT_USE_INTERNAL_SHELL and I will then try to fix the tests that fail with it but adding the missing features. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.common.cfg')
-rw-r--r--test/lit.common.cfg15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg
index 648c7fa3c..d59d7d668 100644
--- a/test/lit.common.cfg
+++ b/test/lit.common.cfg
@@ -11,8 +11,19 @@ import subprocess
import lit.formats
import lit.util
-# Setup test format. Use bash on Unix and the lit shell on Windows.
-execute_external = (not sys.platform in ['win32'])
+
+# Choose between lit's internal shell pipeline runner and a real shell. If
+# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
+use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
+if use_lit_shell:
+ # 0 is external, "" is default, and everything else is internal.
+ execute_external = (use_lit_shell == "0")
+else:
+ # Otherwise we default to internal on Windows and external elsewhere, as
+ # bash on Windows is usually very slow.
+ execute_external = (not sys.platform in ['win32'])
+
+# Setup test format.
config.test_format = lit.formats.ShTest(execute_external)
if execute_external:
config.available_features.add('shell')