[PATCH] D16488: Fix getCompiler in unit testing framework on compiler symlinks
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 15:18:07 PST 2016
fjricci updated this revision to Diff 45759.
fjricci marked an inline comment as done.
fjricci added a comment.
Resolve symlink instead of parsing version output
http://reviews.llvm.org/D16488
Files:
packages/Python/lldbsuite/test/plugins/builder_base.py
Index: packages/Python/lldbsuite/test/plugins/builder_base.py
===================================================================
--- packages/Python/lldbsuite/test/plugins/builder_base.py
+++ packages/Python/lldbsuite/test/plugins/builder_base.py
@@ -15,14 +15,16 @@
import os, sys
import platform
import lldbsuite.test.lldbtest as lldbtest
+from subprocess import check_output, STDOUT
def getArchitecture():
"""Returns the architecture in effect the test suite is running with."""
return os.environ["ARCH"] if "ARCH" in os.environ else ""
def getCompiler():
"""Returns the compiler in effect the test suite is running with."""
- return os.environ["CC"] if "CC" in os.environ else "clang"
+ compiler = os.environ.get("CC", "clang")
+ return os.path.realpath(compiler)
def getArchFlag():
"""Returns the flag required to specify the arch"""
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16488.45759.patch
Type: text/x-patch
Size: 881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160122/f3ad7303/attachment.bin>
More information about the llvm-commits
mailing list