Revert "solve failure testcases are not pushed to testDB problem" 09/25109/3
authorMorgan Richomme <morgan.richomme@orange.com>
Tue, 29 Nov 2016 10:10:47 +0000 (10:10 +0000)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 30 Nov 2016 19:19:17 +0000 (20:19 +0100)
This reverts commit a41264c46d583a68d48de041663213752dc62bf3.

Change-Id: Id62c5342fffb5d75672127d9765d4cc882e3f4df
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
functest/ci/run_tests.py
functest/core/TestCasesBase.py

index da9d28a..66d5881 100644 (file)
@@ -140,10 +140,9 @@ def run_test(test, tier_name):
             cls = getattr(module, run_dict['class'])
             test_case = cls()
             result = test_case.run()
-
-            if result != TestCasesBase.TestCasesBase.EX_SKIP and \
-               GlobalVariables.REPORT_FLAG:
-                test_case.push_to_db()
+            if (result == TestCasesBase.TestCasesBase.EX_OK and
+                    GlobalVariables.REPORT_FLAG):
+                result = test_case.push_to_db()
         except ImportError:
             logger.exception("Cannot import module {}".format(
                 run_dict['module']))
index e1c002d..ac20107 100644 (file)
@@ -19,7 +19,6 @@ 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()