Return error code when test case failed
Change-Id: I24442d37787bd7dd4dcc780f42a44d216c149d6e
This commit is contained in:
parent
b314547b97
commit
fbf71441df
@ -15,5 +15,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python-pip \
|
python-pip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN pip install pip --upgrade
|
||||||
|
RUN pip install pbr setuptools
|
||||||
RUN pip install vmtp
|
RUN pip install vmtp
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ from prettytable import PrettyTable
|
|||||||
import sshutils
|
import sshutils
|
||||||
|
|
||||||
flow_num = 0
|
flow_num = 0
|
||||||
|
return_code = 0
|
||||||
class FlowPrinter(object):
|
class FlowPrinter(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def print_desc(desc):
|
def print_desc(desc):
|
||||||
@ -701,6 +702,10 @@ def print_report(results):
|
|||||||
"Skipped Scenarios": "%d" % (cnt_skipped)}
|
"Skipped Scenarios": "%d" % (cnt_skipped)}
|
||||||
FILELOG.info(json.dumps(ls_summary, sort_keys=True))
|
FILELOG.info(json.dumps(ls_summary, sort_keys=True))
|
||||||
|
|
||||||
|
if cnt_failed:
|
||||||
|
global return_code
|
||||||
|
return_code = 1
|
||||||
|
|
||||||
def normalize_paths(cfg):
|
def normalize_paths(cfg):
|
||||||
'''
|
'''
|
||||||
Normalize the various paths to config files, tools, ssh priv and pub key
|
Normalize the various paths to config files, tools, ssh priv and pub key
|
||||||
@ -1211,6 +1216,7 @@ def main():
|
|||||||
opts = parse_opts_from_cli()
|
opts = parse_opts_from_cli()
|
||||||
log.setup('vmtp', debug=opts.debug, logfile=opts.logfile)
|
log.setup('vmtp', debug=opts.debug, logfile=opts.logfile)
|
||||||
run_vmtp(opts)
|
run_vmtp(opts)
|
||||||
|
sys.exit(return_code)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user