Run tets from tests folder
Also exclude alarm tests as they are run too long
Change-Id: Ibde5a63f739cfe051a7fb513f85ec300e494076e
Reviewed-on: https://review.gerrithub.io/379599
Reviewed-by: Tatyanka Leontovich <tleontovich@mirantis.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/managers/sl_manager.py b/tcp_tests/managers/sl_manager.py
index 07a1302..f3c4877 100644
--- a/tcp_tests/managers/sl_manager.py
+++ b/tcp_tests/managers/sl_manager.py
@@ -81,13 +81,20 @@
service_stat_dict.update({tmp[0]: tmp[1]})
return service_stat_dict
- def run_sl_functional_tests(self, node_to_run, path_tests_to_run):
+ def run_sl_functional_tests(self, node_to_run, tests_path,
+ test_to_run, skip_tests):
target_node_name = [node_name for node_name
in self.__underlay.node_names()
if node_to_run in node_name]
+ if skip_tests:
+ cmd = "cd {0}; pytest -k 'not {1}' {2}".format(
+ tests_path, skip_tests, test_to_run)
+ else:
+ cmd = "cd {0}; pytest -k {1}".format(tests_path, test_to_run)
with self.__underlay.remote(node_name=target_node_name[0]) \
as node_remote:
- cmd = "pytest -k {}".format(path_tests_to_run)
+ LOG.debug("Run {0} on the node {1}".format(
+ cmd, target_node_name[0]))
result = node_remote.execute(cmd)
LOG.debug("Test execution result is {}".format(result))
return result