summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-02-09 04:19:21 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-02-09 04:19:21 +0000
commitc37b4294847a4a3a3c517d4b3f17c6f3603c1733 (patch)
treecaef58e726a709ddccac1a510b92a36d6b717830 /test/lit.cfg
parent302b16932332fc3eb46a3a65f33597ab1519988a (diff)
downloadllvm-c37b4294847a4a3a3c517d4b3f17c6f3603c1733.tar.gz
llvm-c37b4294847a4a3a3c517d4b3f17c6f3603c1733.tar.bz2
llvm-c37b4294847a4a3a3c517d4b3f17c6f3603c1733.tar.xz
test/lit.cfg: Seek sane tools(and bash) in directories and set to $PATH.
LitConfig.getBashPath() will not seek in $PATH after LitConfig.getToolsPath() was executed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index fef6d78902..21b0a48be9 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -19,6 +19,18 @@ config.suffixes = []
# 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:
@@ -273,7 +285,7 @@ config.on_clone = on_clone
### Features
# Shell execution
-if sys.platform not in ['win32']:
+if sys.platform not in ['win32'] or lit.getBashPath() != '':
config.available_features.add('shell')
# Loadable module