Exit correctly so test.py can be used in CI

(cherry picked from commit d516fe71ea1d8bdb7b2e278fa519f7f860d7e234)
This commit is contained in:
Jeff Forcier 2012-09-10 11:35:02 -07:00
parent e0be91a4c9
commit 557eb524f0
1 changed files with 3 additions and 0 deletions

View File

@ -148,6 +148,9 @@ def main():
for thread in threading.enumerate(): for thread in threading.enumerate():
if thread is not threading.currentThread(): if thread is not threading.currentThread():
thread._Thread__stop() thread._Thread__stop()
# Exit correctly
if not result.wasSuccessful():
sys.exit(1)
if __name__ == '__main__': if __name__ == '__main__':