[Lldb-commits] [PATCH] D31335: Allow getCompiler to return None in the test suite

2017-03-24 Thread Francis Ricci via Phabricator via lldb-commits
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


[Lldb-commits] [PATCH] D31335: Allow getCompiler to return None in the test suite

2017-03-26 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

This doesn't bother me too much, but i'm curious about how are you getting 
anything reasonable out of the test suite without a working compiler (?)


https://reviews.llvm.org/D31335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D31335: Allow getCompiler to return None in the test suite

2017-03-27 Thread Francis Ricci via Phabricator via lldb-commits
fjricci abandoned this revision.
fjricci added a comment.

I primarily wrote this because `getArchFlag()` accounts for the possibility 
that `getCompiler()` can be None. But my problem was unrelated, so I don't need 
this (and I agree that it would be surprising if anyone did).


https://reviews.llvm.org/D31335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits