From 997a42438f2253aa9fe640c1cbdd8ea461901948 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 18 Jun 2017 23:43:51 +0200 Subject: Remove all references to /home/opnfv/repos/functest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It also removes relative (and incomplete) references which could be defined in modules instead of this global configuration. Change-Id: Ie20dc3547e49b6224aa8100cd380d37b87ece5a9 Signed-off-by: Cédric Ollivier --- functest/cli/commands/cli_testcase.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'functest/cli/commands/cli_testcase.py') diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py index 3d3f1cb3..91904d87 100644 --- a/functest/cli/commands/cli_testcase.py +++ b/functest/cli/commands/cli_testcase.py @@ -10,6 +10,7 @@ """ global variables """ import os +import pkg_resources import click @@ -25,7 +26,7 @@ class CliTestcase(object): self.tiers = tb.TierBuilder( CONST.__getattribute__('INSTALLER_TYPE'), CONST.__getattribute__('DEPLOY_SCENARIO'), - CONST.__getattribute__('functest_testcases_yaml')) + pkg_resources.resource_filename('functest', 'ci/testcases.yaml')) def list(self): summary = "" @@ -59,8 +60,8 @@ class CliTestcase(object): else: tests = testname.split(",") for test in tests: - cmd = ("python %s/functest/ci/run_tests.py " - "%s -t %s" % - (CONST.__getattribute__('dir_repo_functest'), + cmd = ("python %s %s -t %s" % + (pkg_resources.resource_filename( + 'functest', 'ci/run_tests.py'), flags, test)) ft_utils.execute_command(cmd) -- cgit 1.2.3-korg