fjricci created this revision.
Prior to r259433, getCompiler could return None without causing a
test suite crash. However, passing a NoneType to realpath will
cause a crash. Prevent this crash by allowing getCompiler to return None.
https://reviews.llvm.org/D31335
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
@@ -33,7 +33,7 @@
"""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)
+return os.path.realpath(compiler) if compiler else None
def getArchFlag():
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
@@ -33,7 +33,7 @@
"""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)
+return os.path.realpath(compiler) if compiler else None
def getArchFlag():
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits