From: jose.lausuch Date: Wed, 27 Jul 2016 08:29:07 +0000 (+0200) Subject: Return -1 if the tests fail X-Git-Tag: colorado.1.0~18 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=2c1133ddf223c90582a80c25f15d67d606818f77;p=sdnvpn.git Return -1 if the tests fail Change-Id: I19c3e8b979376a38b8a5838b7a41a3915f90b57f Signed-off-by: jose.lausuch --- diff --git a/test/functest/run_tests.py b/test/functest/run_tests.py index c913912..7092479 100644 --- a/test/functest/run_tests.py +++ b/test/functest/run_tests.py @@ -7,15 +7,17 @@ # # http://www.apache.org/licenses/LICENSE-2.0 # + import argparse import importlib import os +import sys import time import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils import yaml -""" tests configuration """ + parser = argparse.ArgumentParser() parser.add_argument("-r", "--report", help="Create json result file", @@ -86,7 +88,10 @@ def main(): "bgpvpn", overall_start_time, overall_end_time, overall_status, overall_details) - exit(0) + if overall_status == "FAIL": + sys.exit(-1) + + sys.exit(0) if __name__ == '__main__':