mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
fix #658: sys.exit 1 if any testcase failed
This commit is contained in:
+7
-1
@@ -1,6 +1,12 @@
|
|||||||
# Release History
|
# 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**
|
**Changed**
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -3,6 +3,7 @@
|
|||||||
def main_hrun():
|
def main_hrun():
|
||||||
""" API test: parse command line options and run commands.
|
""" API test: parse command line options and run commands.
|
||||||
"""
|
"""
|
||||||
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
from httprunner import logger
|
from httprunner import logger
|
||||||
from httprunner import __description__, __version__
|
from httprunner import __description__, __version__
|
||||||
@@ -85,7 +86,10 @@ def main_hrun():
|
|||||||
logger.log_error("!!!!!!!!!! exception stage: {} !!!!!!!!!!".format(runner.exception_stage))
|
logger.log_error("!!!!!!!!!! exception stage: {} !!!!!!!!!!".format(runner.exception_stage))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
return 0
|
if runner.summary and runner.summary["success"]:
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def main_locust():
|
def main_locust():
|
||||||
|
|||||||
Reference in New Issue
Block a user