diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2016-10-11 15:42:56 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2016-10-17 09:14:01 +0200 |
commit | 6ba4e817cf71a69ddf6606dcc5005b8d8e8692e9 (patch) | |
tree | 1f414e0ffb4ab7abf64e50c9e7f8ecbcca5d4708 /ci | |
parent | ed47f47c4e08fb45dcdf6addee0eb6272dc13628 (diff) |
Conform ODL to TestCasesBase
Now ODLTestCases inherits from TestCasesBase what induces several
modifications of function definitions.
It also renames functest_run to run and run to main and they now
return the code status defined in TestCasesBase instead of True and
False (run_tests.py has been adapted as well).
It checks if errno is equal to EEXIST when makedir raises an OSError
exception.
JIRA: FUNCTEST-353
Change-Id: I88240a9ce8e491dab4c7e6c604f3ecc62cf9edce
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/run_tests.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py index 638a6edf3..834a29bfe 100755 --- a/ci/run_tests.py +++ b/ci/run_tests.py @@ -17,12 +17,14 @@ import argparse import functest.ci.generate_report as generate_report import functest.ci.tier_builder as tb +import functest.core.TestCasesBase as TestCasesBase import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils import functest.utils.openstack_clean as os_clean import functest.utils.openstack_snapshot as os_snapshot import functest.utils.openstack_utils as os_utils -from functest.testcases.Controllers.ODL.OpenDaylightTesting import ODLTestCases +import functest.testcases.Controllers.ODL.OpenDaylightTesting as odl_test + parser = argparse.ArgumentParser() parser.add_argument("-t", "--test", dest="test", action='store', @@ -101,10 +103,10 @@ def run_test(test, tier_name): flags += " -r" if test_name == 'odl': - result = ODLTestCases.functest_run() - if result and REPORT_FLAG: - result = ODLTestCases.push_to_db() - result = not result + odl = odl_test.ODLTestCases() + result = odl.run() + if result == TestCasesBase.TestCasesBase.EX_OK and REPORT_FLAG: + result = odl.push_to_db() else: cmd = ("%s%s" % (EXEC_SCRIPT, flags)) logger.debug("Executing command '%s'" % cmd) |