fix #658: sys.exit 1 if any testcase failed

This commit is contained in:
debugtalk
2019-07-28 11:53:18 +08:00
parent 245891a629
commit bf6d4b63b5
2 changed files with 12 additions and 2 deletions

View File

@@ -1,6 +1,12 @@
# Release History
## 2.2.4 (2019-07-13)
## 2.2.5 (2019-07-28)
**Fixed**
- fix #658: sys.exit 1 if any testcase failed
## 2.2.4 (2019-07-18)
**Changed**

View File

@@ -3,6 +3,7 @@
def main_hrun():
""" API test: parse command line options and run commands.
"""
import sys
import argparse
from httprunner import logger
from httprunner import __description__, __version__
@@ -85,7 +86,10 @@ def main_hrun():
logger.log_error("!!!!!!!!!! exception stage: {} !!!!!!!!!!".format(runner.exception_stage))
raise
return 0
if runner.summary and runner.summary["success"]:
sys.exit(0)
else:
sys.exit(1)
def main_locust():