Skip to content

Commit 509d4f5

Browse files
author
Marcos Pividori
committedFeb 8, 2017
[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
1 parent 4a65bc3 commit 509d4f5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎llvm/lib/Fuzzer/test/lit.cfg

+17
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ config.test_format = lit.formats.ShTest(True)
66
config.suffixes = ['.test']
77
config.test_source_root = os.path.dirname(__file__)
88

9+
# Choose between lit's internal shell pipeline runner and a real shell. If
10+
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
11+
use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
12+
if use_lit_shell:
13+
# 0 is external, "" is default, and everything else is internal.
14+
execute_external = (use_lit_shell == "0")
15+
else:
16+
# Otherwise we default to internal on Windows and external elsewhere, as
17+
# bash on Windows is usually very slow.
18+
execute_external = (not sys.platform in ['win32'])
19+
20+
# testFormat: The test format to use to interpret tests.
21+
#
22+
# For now we require '&&' between commands, until they get globally killed and
23+
# the test runner updated.
24+
config.test_format = lit.formats.ShTest(execute_external)
25+
926
# Tweak PATH to include llvm tools dir and current exec dir.
1027
llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
1128
if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)):

0 commit comments

Comments
 (0)
Please sign in to comment.