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)
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)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits