diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-07-12 17:28:31 +0200 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-07-12 16:17:03 +0000 |
commit | b2058a81210e70dbfc3bcf1f5ed9f7cdbc73c62a (patch) | |
tree | 731336ca49b4442522df7c42ded1b874c624ccc3 /test/functest | |
parent | 9c41d70e736bd9fd19bf6448bc87a45407e395da (diff) |
Bugfix run_tests fails to run python scripts
Change-Id: Ibd97de79eb8d824120eb2a1b80017ff1f9f99f14
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'test/functest')
-rw-r--r-- | test/functest/run_tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functest/run_tests.py b/test/functest/run_tests.py index dbe6261..0176161 100644 --- a/test/functest/run_tests.py +++ b/test/functest/run_tests.py @@ -8,10 +8,12 @@ # http://www.apache.org/licenses/LICENSE-2.0 # +import importlib import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils import yaml + logger = ft_logger.Logger("sdnvpn").getLogger() with open('config.yaml') as f: @@ -24,8 +26,8 @@ for testcase in testcases: print(title) print("%s\n" % ("=" * len(title))) if testcases[testcase]['type'] == 'python': - filename = testcase + ".py" - filename.main() + t = importlib.import_module(testcase, package=None) + t.main() else: cmd = "bash " + testcase + ".sh" result = ft_utils.execute_command(cmd, logger, exit_on_error=False) |