summaryrefslogtreecommitdiffstats
path: root/test/functest
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-07-27 10:29:07 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-07-27 10:30:33 +0200
commit2c1133ddf223c90582a80c25f15d67d606818f77 (patch)
treef47d6a233543639bab6063340cdccce82ce1510c /test/functest
parentece06a28536eee7043acc7a0491accd38b05042e (diff)
Return -1 if the tests fail
Change-Id: I19c3e8b979376a38b8a5838b7a41a3915f90b57f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'test/functest')
-rw-r--r--test/functest/run_tests.py9
1 files changed, 7 insertions, 2 deletions
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__':