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 --- .../opnfv_tests/openstack/tempest/conf_utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'functest/opnfv_tests/openstack/tempest') diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index 4eb5661e9..fa8f00fc8 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -10,6 +10,7 @@ import ConfigParser import logging import os +import pkg_resources import re import shutil import subprocess @@ -21,19 +22,18 @@ import functest.utils.openstack_utils as os_utils IMAGE_ID_ALT = None FLAVOR_ID_ALT = None -REPO_PATH = CONST.__getattribute__('dir_repo_functest') GLANCE_IMAGE_PATH = os.path.join( CONST.__getattribute__('dir_functest_images'), CONST.__getattribute__('openstack_image_file_name')) -TEMPEST_TEST_LIST_DIR = CONST.__getattribute__('dir_tempest_cases') TEMPEST_RESULTS_DIR = os.path.join(CONST.__getattribute__('dir_results'), 'tempest') -TEMPEST_CUSTOM = os.path.join(REPO_PATH, TEMPEST_TEST_LIST_DIR, - 'test_list.txt') -TEMPEST_BLACKLIST = os.path.join(REPO_PATH, TEMPEST_TEST_LIST_DIR, - 'blacklist.txt') -TEMPEST_DEFCORE = os.path.join(REPO_PATH, TEMPEST_TEST_LIST_DIR, - 'defcore_req.txt') +TEMPEST_CUSTOM = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/tempest/custom_tests/test_list.txt') +TEMPEST_BLACKLIST = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/tempest/custom_tests/blacklist.txt') +TEMPEST_DEFCORE = pkg_resources.resource_filename( + 'functest', + 'opnfv_tests/openstack/tempest/custom_tests/defcore_req.txt') TEMPEST_RAW_LIST = os.path.join(TEMPEST_RESULTS_DIR, 'test_raw_list.txt') TEMPEST_LIST = os.path.join(TEMPEST_RESULTS_DIR, 'test_list.txt') REFSTACK_RESULTS_DIR = os.path.join(CONST.__getattribute__('dir_results'), @@ -253,9 +253,9 @@ def configure_tempest_defcore(deployment_dir, img_flavor_dict): with open(conf_file, 'wb') as config_file: config.write(config_file) - confpath = os.path.join( - CONST.__getattribute__('dir_functest_test'), - CONST.__getattribute__('refstack_tempest_conf_path')) + confpath = pkg_resources.resource_filename( + 'functest', + 'opnfv_tests/openstack/refstack_client/refstack_tempest.conf') shutil.copyfile(conf_file, confpath) -- cgit 1.2.3-korg