diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-07-03 03:59:34 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-07-03 03:59:34 +0000 |
commit | 95643d0832e3a5d72c0535f6bb84b4a7b4a04f96 (patch) | |
tree | 3fc937faea356d728def70011d4d075792858e56 | |
parent | 4c215c08e3e79c5fc221dd0f6e6ce0c1624f895a (diff) | |
download | external_llvm-95643d0832e3a5d72c0535f6bb84b4a7b4a04f96.zip external_llvm-95643d0832e3a5d72c0535f6bb84b4a7b4a04f96.tar.gz external_llvm-95643d0832e3a5d72c0535f6bb84b4a7b4a04f96.tar.bz2 |
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
-rw-r--r-- | test/lit.cfg | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index 575c127..6f44bb3 100644 --- a/test/lit.cfg +++ b/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: |