From 2c1133ddf223c90582a80c25f15d67d606818f77 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 27 Jul 2016 10:29:07 +0200 Subject: Return -1 if the tests fail Change-Id: I19c3e8b979376a38b8a5838b7a41a3915f90b57f Signed-off-by: jose.lausuch --- test/functest/run_tests.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test/functest') 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__': -- cgit 1.2.3-korg