This revision was automatically updated to reflect the committed changes.
Closed by commit rL316393: [lldbtests] Handle errors instead of crashing.
(authored by davide).
Changed prior to commit:
https://reviews.llvm.org/D39199?vs=119917&id=119965#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39199
Files:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
Index: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py
+++ lldb/trunk/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)
Index: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py
+++ lldb/trunk/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)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits