summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMarcos Pividori <mpividori@google.com>2017-02-08 00:02:41 +0000
committerMarcos Pividori <mpividori@google.com>2017-02-08 00:02:41 +0000
commit509d4f5aa911f469a99edb3d6217de0b6756e064 (patch)
tree143b2e2ef5c291001a352e25ba468a3e39ea9de6 /llvm/lib
parent4a65bc35c37fa4bde83c258472a87d187330d78e (diff)
downloadbcm5719-llvm-509d4f5aa911f469a99edb3d6217de0b6756e064.tar.gz
bcm5719-llvm-509d4f5aa911f469a99edb3d6217de0b6756e064.zip
[libFuzzer] Properly configure tests for Windows.
This configuration is necessary, and is included in all tests suites. We need to execute: `config.test_format = lit.formats.ShTest(False)` Otherwise, lit will try to use bash, which generates many problems. Differential Revision: https://reviews.llvm.org/D29529 llvm-svn: 294380
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Fuzzer/test/lit.cfg17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/test/lit.cfg b/llvm/lib/Fuzzer/test/lit.cfg
index c3e7c3835d0..55391b8f483 100644
--- a/llvm/lib/Fuzzer/test/lit.cfg
+++ b/llvm/lib/Fuzzer/test/lit.cfg
@@ -6,6 +6,23 @@ config.test_format = lit.formats.ShTest(True)
config.suffixes = ['.test']
config.test_source_root = os.path.dirname(__file__)
+# 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'])
+
+# testFormat: The test format to use to interpret tests.
+#
+# For now we require '&&' between commands, until they get globally killed and
+# the test runner updated.
+config.test_format = lit.formats.ShTest(execute_external)
+
# Tweak PATH to include llvm tools dir and current exec dir.
llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)):
OpenPOWER on IntegriCloud