Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoke tests for the tools #1032

Merged
merged 5 commits into from
Mar 11, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
trace: Exit with nonzero return code on error
  • Loading branch information
goldshtn committed Mar 11, 2017
commit 2febc297ef590fa6a6021c737e28f5e467275bca
7 changes: 5 additions & 2 deletions tools/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,13 @@ def run(self):
self._attach_probes()
self._main_loop()
except:
exc_info = sys.exc_info()
sys_exit = exc_info[0] is SystemExit
if self.args.verbose:
traceback.print_exc()
elif sys.exc_info()[0] is not SystemExit:
print(sys.exc_info()[1])
elif not sys_exit:
print(exc_info[1])
exit(0 if sys_exit else 1)

if __name__ == "__main__":
Tool().run()