summaryrefslogtreecommitdiffstats
path: root/test/functest
diff options
context:
space:
mode:
Diffstat (limited to 'test/functest')
-rw-r--r--test/functest/run_tests.py6
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)