diff options
author | Pavel Labath <labath@google.com> | 2016-02-02 09:49:37 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-02-02 09:49:37 +0000 |
commit | e8baa4498dde732804b8012ee982142f0ca87fff (patch) | |
tree | 2e74851c4583870b1bafc514de4f036613defb0a /lldb/packages/Python/lldbsuite/test/plugins | |
parent | 6c2ae4592d84529557e7b2a9ef0e435dbacbab44 (diff) | |
download | bcm5719-llvm-e8baa4498dde732804b8012ee982142f0ca87fff.tar.gz bcm5719-llvm-e8baa4498dde732804b8012ee982142f0ca87fff.zip |
Fix compiler lookup when specified without path
r259433 introduced a regression, where if a compiler is specified without a path (e.g., CC=clang,
relying on the fact that clang is in $PATH), then the test suite would fail (at the compiler
version detection step) because realpath would interpret this as a path relative to cwd). The fix
is to perform the $PATH expansion (via `which`) before the realpath step.
llvm-svn: 259484
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/plugins')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/plugins/builder_base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py b/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py index f4c80569208..0cff14c2269 100644 --- a/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py +++ b/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py @@ -15,6 +15,7 @@ variable. import os, sys import platform import lldbsuite.test.lldbtest as lldbtest +import lldbsuite.test.lldbutil as lldbutil def getArchitecture(): """Returns the architecture in effect the test suite is running with.""" @@ -23,6 +24,7 @@ def getArchitecture(): def getCompiler(): """Returns the compiler in effect the test suite is running with.""" compiler = os.environ.get("CC", "clang") + compiler = lldbutil.which(compiler) return os.path.realpath(compiler) def getArchFlag(): |