Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -1193,6 +1193,18 @@ version = 'unknown' compiler = self.getCompiler() + + # strip off leading spaces, prefixes (e.g. ccache, distcc, etc.) and + # trailing complier options to create a single-word compiler name. + # otherwise, unit tests will fail if: + # 1) check-lldb is configured/built w/ ccache + # 2) they are built w/ ccache + compiler_split = compiler.split(" ") + for word in reversed(compiler_split) : + if which(word) != None : + compiler = word + break + version_output = system([[which(compiler), "-v"]])[1] for line in version_output.split(os.linesep): m = re.search('version ([0-9\.]+)', line)