[Lldb-commits] [PATCH] D39199: [lldbtests] Handle errors instead of crashing
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 23 12:37:28 PDT 2017
davide updated this revision to Diff 119917.
https://reviews.llvm.org/D39199
Files:
packages/Python/lldbsuite/test/dotest.py
Index: packages/Python/lldbsuite/test/dotest.py
===================================================================
--- packages/Python/lldbsuite/test/dotest.py
+++ packages/Python/lldbsuite/test/dotest.py
@@ -50,7 +50,11 @@
def is_exe(fpath):
- """Returns true if fpath is an executable."""
+ """Returns true if fpath is an executable.
+ Exits with an error code if the specified path is invalid"""
+ if not os.path.exists(fpath):
+ print(fpath + " is not a valid path, exiting")
+ sys.exit(-1)
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39199.119917.patch
Type: text/x-patch
Size: 599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171023/9bfa4073/attachment.bin>
More information about the lldb-commits
mailing list