aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/ci/run_tests.py')
-rwxr-xr-xfunctest/ci/run_tests.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index af45c321..722df14f 100755
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -14,6 +14,7 @@ import importlib
import logging
import logging.config
import os
+import pkg_resources
import re
import sys
@@ -201,7 +202,7 @@ class Runner(object):
_tiers = tb.TierBuilder(
CONST.__getattribute__('INSTALLER_TYPE'),
CONST.__getattribute__('DEPLOY_SCENARIO'),
- CONST.__getattribute__("functest_testcases_yaml"))
+ pkg_resources.resource_filename('functest', 'ci/testcases.yaml'))
if kwargs['noclean']:
self.clean_flag = False
@@ -251,24 +252,26 @@ class Runner(object):
msg.add_row([env_var, CONST.__getattribute__(env_var)])
logger.info("Deployment description: \n\n%s\n", msg)
- msg = prettytable.PrettyTable(
- header_style='upper', padding_width=5,
- field_names=['test case', 'project', 'tier', 'duration', 'result'])
- for test_case in self.executed_test_cases:
- result = 'PASS' if(test_case.is_successful(
- ) == test_case.EX_OK) else 'FAIL'
- msg.add_row([test_case.case_name, test_case.project_name,
- _tiers.get_tier_name(test_case.case_name),
- test_case.get_duration(), result])
- logger.info("FUNCTEST REPORT: \n\n%s\n", msg)
+ if len(self.executed_test_cases) > 1:
+ msg = prettytable.PrettyTable(
+ header_style='upper', padding_width=5,
+ field_names=['test case', 'project', 'tier',
+ 'duration', 'result'])
+ for test_case in self.executed_test_cases:
+ result = 'PASS' if(test_case.is_successful(
+ ) == test_case.EX_OK) else 'FAIL'
+ msg.add_row([test_case.case_name, test_case.project_name,
+ _tiers.get_tier_name(test_case.case_name),
+ test_case.get_duration(), result])
+ logger.info("FUNCTEST REPORT: \n\n%s\n", msg)
logger.info("Execution exit value: %s" % self.overall_result)
return self.overall_result
if __name__ == '__main__':
- logging.config.fileConfig(
- CONST.__getattribute__('dir_functest_logging_cfg'))
+ logging.config.fileConfig(pkg_resources.resource_filename(
+ 'functest', 'ci/logging.ini'))
parser = RunTestsParser()
args = parser.parse_args(sys.argv[1:])
runner = Runner()