Merge "solve failure testcases are not pushed to testDB problem"
authorMorgan Richomme <morgan.richomme@orange.com>
Wed, 23 Nov 2016 10:13:41 +0000 (10:13 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 23 Nov 2016 10:13:41 +0000 (10:13 +0000)
functest/ci/run_tests.py
functest/core/TestCasesBase.py

index 70b5bbc..e8be429 100644 (file)
@@ -123,7 +123,7 @@ def run_test(test, tier_name):
             cls = getattr(module, run_dict['class'])
             test_case = cls()
             result = test_case.run()
-            if result == TestCasesBase.TestCasesBase.EX_OK and REPORT_FLAG:
+            if result != TestCasesBase.TestCasesBase.EX_SKIP and REPORT_FLAG:
                 result = test_case.push_to_db()
         except ImportError:
             logger.exception("Cannot import module {}".format(
index bd02e13..ab1ad0d 100644 (file)
@@ -18,6 +18,7 @@ class TestCasesBase(object):
     EX_OK = os.EX_OK
     EX_RUN_ERROR = os.EX_SOFTWARE
     EX_PUSH_TO_DB_ERROR = os.EX_SOFTWARE - 1
+    EX_SKIP = os.EX_SOFTWARE - 2
 
     logger = ft_logger.Logger(__name__).getLogger()