diff options
author | helenyao <yaohelan@huawei.com> | 2016-11-21 06:50:06 -0500 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-11-24 15:14:45 +0100 |
commit | 3e3c96b2aa15d7757f281ce00518a67e2a1225a9 (patch) | |
tree | 9b15e0ceab33a9301ca7cde1a0a36e05f2347584 /functest/opnfv_tests/features/copper.py | |
parent | 7a776398ef8b17bd9af5367d712707a903c1c86a (diff) |
Extracted all global parameters into functest_constants.py
JIRA: FUNCTEST-533
1. Extracted all global variables into functest_constants.py and updated all affected areas accordingly
2. Used os.path.join to replace '/' to come up with the path for better cross-platform support and improve the path accuracy
3. Removed unused variables
4. Updated the hardcoded path in Dockerfile by using variable reference
5. Removed "/" ending from all path variables
6. Updated the unit test
Change-Id: Ib30a81d1f0c83fbaef042d63c187c27bd18301bb
Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/features/copper.py')
-rwxr-xr-x | functest/opnfv_tests/features/copper.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/functest/opnfv_tests/features/copper.py b/functest/opnfv_tests/features/copper.py index ab016262..d003779e 100755 --- a/functest/opnfv_tests/features/copper.py +++ b/functest/opnfv_tests/features/copper.py @@ -20,7 +20,7 @@ import time import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as functest_utils - +import functest.utils.functest_constants as ft_constants parser = argparse.ArgumentParser() parser.add_argument("-r", "--report", @@ -28,16 +28,14 @@ parser.add_argument("-r", "--report", action="store_true") args = parser.parse_args() -COPPER_REPO = \ - functest_utils.get_functest_config('general.directories.dir_repo_copper') -RESULTS_DIR = \ - functest_utils.get_functest_config('general.directories.dir_results') +COPPER_REPO_DIR = ft_constants.COPPER_REPO_DIR +RESULTS_DIR = ft_constants.FUNCTEST_RESULTS_DIR logger = ft_logger.Logger("copper").getLogger() def main(): - cmd = "%s/tests/run.sh %s/tests" % (COPPER_REPO, COPPER_REPO) + cmd = "%s/tests/run.sh %s/tests" % (COPPER_REPO_DIR, COPPER_REPO_DIR) start_time = time.time() @@ -80,5 +78,6 @@ def main(): sys.exit(0) + if __name__ == '__main__': main() |