From d6484df9b602f0888450ef1e29ccc0a5f6c94675 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 24 Aug 2016 17:55:10 +0200 Subject: Stop calling exec_test.sh in the middle of python scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ci/run_tests.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'ci') 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() -- cgit 1.2.3-korg