diff --git a/utils/lit/lit/LitConfig.py b/utils/lit/lit/LitConfig.py index 43ed6f1a1f7..7ca1b9c4c63 100644 --- a/utils/lit/lit/LitConfig.py +++ b/utils/lit/lit/LitConfig.py @@ -85,6 +85,22 @@ class LitConfig: return self.bashPath + def getToolsPath(self, dir, paths, tools): + import os, Util + if dir is not None and os.path.isabs(dir) and os.path.isdir(dir): + if not Util.checkToolsPath(dir, tools): + return None + else: + dir = Util.whichTools(tools, paths) + + # bash + self.bashPath = Util.which('bash', dir) + if self.bashPath is None: + self.warning("Unable to find 'bash.exe'.") + self.bashPath = '' + + return dir + def _write_message(self, kind, message): import inspect, os, sys