mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
llvm/test/lit.cfg: Retweak for Win32 to fix testing.
- execute_external should be; - Not on Win32. - Using bash. In reverse, "execute_internal" shoud be (Win32 && !bash). - lit.getBashPath() behaves differently before and after tweaking $PATH. I will add a few explanations there later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c215c08e3
commit
95643d0832
26
test/lit.cfg
26
test/lit.cfg
@ -9,8 +9,20 @@ import re
|
||||
# name: The name of this test suite.
|
||||
config.name = 'LLVM'
|
||||
|
||||
# Tweak PATH for Win32 to decide to use bash.exe or not.
|
||||
if sys.platform in ['win32']:
|
||||
# Seek sane tools in directories and set to $PATH.
|
||||
path = getattr(config, 'lit_tools_dir', None)
|
||||
path = lit.getToolsPath(path,
|
||||
config.environment['PATH'],
|
||||
['cmp.exe', 'grep.exe', 'sed.exe'])
|
||||
if path is not None:
|
||||
path = os.path.pathsep.join((path,
|
||||
config.environment['PATH']))
|
||||
config.environment['PATH'] = path
|
||||
|
||||
# testFormat: The test format to use to interpret tests.
|
||||
execute_external = (sys.platform in ['win32']
|
||||
execute_external = (not sys.platform in ['win32']
|
||||
or lit.getBashPath() not in [None, ""])
|
||||
config.test_format = lit.formats.ShTest(execute_external)
|
||||
|
||||
@ -29,18 +41,6 @@ config.excludes = ['Inputs']
|
||||
# test_source_root: The root path where tests are located.
|
||||
config.test_source_root = os.path.dirname(__file__)
|
||||
|
||||
# Tweak PATH for Win32
|
||||
if sys.platform in ['win32']:
|
||||
# Seek sane tools in directories and set to $PATH.
|
||||
path = getattr(config, 'lit_tools_dir', None)
|
||||
path = lit.getToolsPath(path,
|
||||
config.environment['PATH'],
|
||||
['cmp.exe', 'grep.exe', 'sed.exe'])
|
||||
if path is not None:
|
||||
path = os.path.pathsep.join((path,
|
||||
config.environment['PATH']))
|
||||
config.environment['PATH'] = path
|
||||
|
||||
# test_exec_root: The root path where tests should be run.
|
||||
llvm_obj_root = getattr(config, 'llvm_obj_root', None)
|
||||
if llvm_obj_root is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user