diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-04-23 08:59:43 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-04-26 09:35:47 +0200 |
commit | e620488a6747318c40eb973c2607ae6d44e95b8f (patch) | |
tree | 7654490079abb39af4a48b2edf249efc66cb9874 /functest/core/feature.py | |
parent | 9d4e6cb10fef5f0cef104861034340cda5e48a3e (diff) |
Switch TestCase attribute criteria to result
It mainly avoids mixing input and output.
Criteria is now an input set in functest/ci/testcases.yaml and then
must be passed as __init__() args (which will be proposed in an
additional change).
Then it also renames the related TestCase method to
check_result().
Change-Id: Ifc3c8e3ea6cde7e3edf7174bed4bf2bf0894e8e3
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/core/feature.py')
-rw-r--r-- | functest/core/feature.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/functest/core/feature.py b/functest/core/feature.py index 5f8a0873..08500a26 100644 --- a/functest/core/feature.py +++ b/functest/core/feature.py @@ -59,7 +59,7 @@ class Feature(base.TestCase): It sets the following attributes required to push the results to DB: - * criteria, + * result, * start_time, * stop_time. @@ -74,15 +74,15 @@ class Feature(base.TestCase): """ self.start_time = time.time() exit_code = base.TestCase.EX_RUN_ERROR - self.criteria = "FAIL" + self.result = "FAIL" try: if self.execute(**kwargs) == 0: exit_code = base.TestCase.EX_OK - self.criteria = 'PASS' + self.result = 'PASS' ft_utils.logger_test_results( self.project_name, self.case_name, - self.criteria, self.details) - self.logger.info("%s %s", self.project_name, self.criteria) + self.result, self.details) + self.logger.info("%s %s", self.project_name, self.result) except Exception: # pylint: disable=broad-except self.logger.exception("%s FAILED", self.project_name) self.logger.info("Test result is stored in '%s'", self.result_file) |