diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2016-08-24 17:55:10 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-08-26 06:47:29 +0000 |
commit | 224f176cee5544483f3a37bb59a3d9aae1791e44 (patch) | |
tree | 7b5bb2dd1ef752f18ba39912f493f5d31f9088b7 /ci | |
parent | c3728cee7c39ab59534f46fa2ebdcb631733b070 (diff) |
Stop calling exec_test.sh in the middle of python scripts
Now run_tests.py calls directly OpenDaylightTesting.functest_run().
It mainly reads env vars as exec_test.sh does.
Change-Id: Ibb44a7ca67e9218d34d13b8dd539e772902fe5b8
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit d6484df9b602f0888450ef1e29ccc0a5f6c94675)
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/run_tests.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py index 982567217..17481780e 100755 --- a/ci/run_tests.py +++ b/ci/run_tests.py @@ -13,8 +13,10 @@ import datetime import os import re import sys + import functest.ci.generate_report as generate_report import functest.ci.tier_builder as tb +from functest.testcases.Controllers.ODL.OpenDaylightTesting import ODLTestCases import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils import functest.utils.openstack_clean as os_clean @@ -100,9 +102,15 @@ def run_test(test, tier_name): if REPORT_FLAG: flags += " -r" - cmd = ("%s%s" % (EXEC_SCRIPT, flags)) - logger.debug("Executing command '%s'" % cmd) - result = ft_utils.execute_command(cmd, exit_on_error=False) + if test_name == 'odl': + result = ODLTestCases.functest_run() + if result and REPORT_FLAG: + result = ODLTestCases.push_to_db() + result = not result + else: + cmd = ("%s%s" % (EXEC_SCRIPT, flags)) + logger.debug("Executing command '%s'" % cmd) + result = ft_utils.execute_command(cmd, exit_on_error=False) if CLEAN_FLAG: cleanup() |