aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-07-28 09:51:07 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-28 09:51:07 +0000
commitc40bdf5eca9230d61b7d7749d5bfbc09c8a01262 (patch)
tree54fb01f56c4d193bbfa5fc420e959967a0126638 /ci
parent932e23880ad613098ba518dc1fbf84e65db434a9 (diff)
parentf5687e356aafd9eb56a7f50e5e848f61bc712729 (diff)
Merge "Bugfix: dont stop execution when a test case is not blocking"
Diffstat (limited to 'ci')
-rw-r--r--ci/generate_report.py2
-rwxr-xr-xci/run_tests.py23
-rw-r--r--ci/tier_handler.py2
3 files changed, 19 insertions, 8 deletions
diff --git a/ci/generate_report.py b/ci/generate_report.py
index 16962fe0e..53aef0c9e 100644
--- a/ci/generate_report.py
+++ b/ci/generate_report.py
@@ -8,7 +8,7 @@ import functest.utils.functest_logger as ft_logger
COL_1_LEN = 25
COL_2_LEN = 15
COL_3_LEN = 12
-COL_4_LEN = 10
+COL_4_LEN = 15
COL_5_LEN = 75
# If we run from CI (Jenkins) we will push the results to the DB
diff --git a/ci/run_tests.py b/ci/run_tests.py
index a024dd720..383a20f9f 100755
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -75,6 +75,13 @@ def cleanup():
os_clean.main()
+def update_test_info(test_name, result, duration):
+ for test in EXECUTED_TEST_CASES:
+ if test['test_name'] == test_name:
+ test.update({"result": result,
+ "duration": duration})
+
+
def run_test(test, tier_name):
global OVERALL_RESULT, EXECUTED_TEST_CASES
result_str = "PASS"
@@ -109,14 +116,17 @@ def run_test(test, tier_name):
OVERALL_RESULT = -1
result_str = "FAIL"
- if test.get_blocking():
- logger.info("This test case is blocking. Exiting...")
+ if test.is_blocking():
+ if not args.test or args.test == "all":
+ logger.info("This test case is blocking. Aborting overall "
+ "execution.")
+ # if it is a single test we don't print the whole results table
+ update_test_info(test_name, result_str, duration_str)
+ generate_report.main(EXECUTED_TEST_CASES)
+ logger.info("Execution exit value: %s" % OVERALL_RESULT)
sys.exit(OVERALL_RESULT)
- for test in EXECUTED_TEST_CASES:
- if test['test_name'] == test_name:
- test.update({"result": result_str,
- "duration": duration_str})
+ update_test_info(test_name, result_str, duration_str)
return result
@@ -207,6 +217,7 @@ def main():
else:
run_all(_tiers)
+ logger.info("Execution exit value: %s" % OVERALL_RESULT)
sys.exit(OVERALL_RESULT)
if __name__ == '__main__':
diff --git a/ci/tier_handler.py b/ci/tier_handler.py
index 27b9cbcfd..e50fbe6fd 100644
--- a/ci/tier_handler.py
+++ b/ci/tier_handler.py
@@ -131,7 +131,7 @@ class TestCase:
def get_criteria(self):
return self.criteria
- def get_blocking(self):
+ def is_blocking(self):
return self.blocking
def __str__(self):