From 0ead7c9e03034bbb40b68a468a6deaa339b0364e Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 2 Jul 2017 12:56:09 +0200 Subject: Update cli commands to call console scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I401879d7ec713b5307817da8b001838c35d9d731 Signed-off-by: Cédric Ollivier --- functest/cli/commands/cli_env.py | 5 +---- functest/cli/commands/cli_testcase.py | 5 +---- functest/cli/commands/cli_tier.py | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'functest/cli') diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py index ce9775725..99d36996d 100644 --- a/functest/cli/commands/cli_env.py +++ b/functest/cli/commands/cli_env.py @@ -8,7 +8,6 @@ # import os -import pkg_resources import click import prettytable @@ -36,9 +35,7 @@ class CliEnv(object): else: answer = raw_input("Invalid answer. Please type [y|n]\n") - cmd = ("python %s start" % pkg_resources.resource_filename( - 'functest', 'ci/prepare_env.py')) - ft_utils.execute_command(cmd) + ft_utils.execute_command("prepare_env start") def show(self): def _get_value(attr, default='Unknown'): diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py index 91904d870..cb3d47391 100644 --- a/functest/cli/commands/cli_testcase.py +++ b/functest/cli/commands/cli_testcase.py @@ -60,8 +60,5 @@ class CliTestcase(object): else: tests = testname.split(",") for test in tests: - cmd = ("python %s %s -t %s" % - (pkg_resources.resource_filename( - 'functest', 'ci/run_tests.py'), - flags, test)) + cmd = "run_tests {}-t {}".format(flags, test) ft_utils.execute_command(cmd) diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py index 48e9f542a..9b2e60baa 100644 --- a/functest/cli/commands/cli_tier.py +++ b/functest/cli/commands/cli_tier.py @@ -68,6 +68,5 @@ class CliTier(object): click.echo("Functest environment is not ready. " "Run first 'functest env prepare'") else: - cmd = ("python %s %s -t %s" % (pkg_resources.resource_filename( - 'functest', 'ci/run_tests.py'), flags, tiername)) + cmd = "run_tests {}-t {}".format(flags, tiername) ft_utils.execute_command(cmd) -- cgit 1.2.3-korg