From 95643d0832e3a5d72c0535f6bb84b4a7b4a04f96 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 3 Jul 2012 03:59:34 +0000 Subject: [PATCH] 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 --- test/lit.cfg | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/lit.cfg b/test/lit.cfg index 575c1273338..6f44bb3d8c6 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: