From 0157be0431600dd56aaaa3260b72cc40011f91ac Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Thu, 10 Nov 2016 14:31:07 +0100 Subject: [PATCH] change path for python ci files JIRA: FUNCTEST-525 Change-Id: I6b09eaec55e42a3ee1474b21bc7ed87a71118e60 Signed-off-by: Morgan Richomme --- docker/Dockerfile | 3 ++- {ci => functest/ci}/__init__.py | 0 {ci => functest/ci}/check_os.sh | 0 {ci => functest/ci}/config_functest.yaml | 0 {ci => functest/ci}/config_patch.yaml | 0 {ci => functest/ci}/exec_test.sh | 0 {ci => functest/ci}/generate_report.py | 1 + {ci => functest/ci}/prepare_env.py | 4 ++-- {ci => functest/ci}/run_tests.py | 0 {ci => functest/ci}/testcases.yaml | 0 {ci => functest/ci}/tier_builder.py | 0 {ci => functest/ci}/tier_handler.py | 0 functest/cli/commands/cli_env.py | 3 ++- functest/cli/commands/cli_os.py | 2 +- functest/utils/functest_utils.py | 2 +- 15 files changed, 9 insertions(+), 6 deletions(-) rename {ci => functest/ci}/__init__.py (100%) rename {ci => functest/ci}/check_os.sh (100%) mode change 100755 => 100644 rename {ci => functest/ci}/config_functest.yaml (100%) rename {ci => functest/ci}/config_patch.yaml (100%) rename {ci => functest/ci}/exec_test.sh (100%) mode change 100755 => 100644 rename {ci => functest/ci}/generate_report.py (99%) mode change 100755 => 100644 rename {ci => functest/ci}/prepare_env.py (98%) mode change 100755 => 100644 rename {ci => functest/ci}/run_tests.py (100%) mode change 100755 => 100644 rename {ci => functest/ci}/testcases.yaml (100%) rename {ci => functest/ci}/tier_builder.py (100%) rename {ci => functest/ci}/tier_handler.py (100%) diff --git a/docker/Dockerfile b/docker/Dockerfile index 42c24ec0f..cb8e4c035 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -41,7 +41,8 @@ ENV creds /home/opnfv/functest/conf/openstack.creds ENV TERM xterm ENV COLORTERM gnome-terminal ENV PYTHONPATH $PYTHONPATH:/home/opnfv/repos/ -ENV CONFIG_FUNCTEST_YAML /home/opnfv/repos/functest/ci/config_functest.yaml +ENV CONFIG_FUNCTEST_YAML /home/opnfv/repos/functest/functest/ci/config_functest.yaml +ENV PYTHONPATH $PYTHONPATH:/home/opnfv/repos/:/home/opnfv/repos/functest WORKDIR /home/opnfv # Packaged dependencies diff --git a/ci/__init__.py b/functest/ci/__init__.py similarity index 100% rename from ci/__init__.py rename to functest/ci/__init__.py diff --git a/ci/check_os.sh b/functest/ci/check_os.sh old mode 100755 new mode 100644 similarity index 100% rename from ci/check_os.sh rename to functest/ci/check_os.sh diff --git a/ci/config_functest.yaml b/functest/ci/config_functest.yaml similarity index 100% rename from ci/config_functest.yaml rename to functest/ci/config_functest.yaml diff --git a/ci/config_patch.yaml b/functest/ci/config_patch.yaml similarity index 100% rename from ci/config_patch.yaml rename to functest/ci/config_patch.yaml diff --git a/ci/exec_test.sh b/functest/ci/exec_test.sh old mode 100755 new mode 100644 similarity index 100% rename from ci/exec_test.sh rename to functest/ci/exec_test.sh diff --git a/ci/generate_report.py b/functest/ci/generate_report.py old mode 100755 new mode 100644 similarity index 99% rename from ci/generate_report.py rename to functest/ci/generate_report.py index d2e09eb80..c93437294 --- a/ci/generate_report.py +++ b/functest/ci/generate_report.py @@ -2,6 +2,7 @@ import json import os import re import urllib2 + import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils diff --git a/ci/prepare_env.py b/functest/ci/prepare_env.py old mode 100755 new mode 100644 similarity index 98% rename from ci/prepare_env.py rename to functest/ci/prepare_env.py index e110aa572..e5c24cc30 --- a/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -109,7 +109,7 @@ def check_env_variables(): if CI_SCENARIO is None: logger.warning("The env variable 'DEPLOY_SCENARIO' is not defined. " - "Setting CE_SCENARIO=undefined.") + "Setting CI_SCENARIO=undefined.") CI_SCENARIO = "undefined" else: logger.info(" DEPLOY_SCENARIO=%s" % CI_SCENARIO) @@ -205,7 +205,7 @@ def patch_config_file(): def verify_deployment(): print_separator() logger.info("Verifying OpenStack services...") - cmd = ("%s/ci/check_os.sh" % ft_utils.FUNCTEST_REPO) + cmd = ("%s/functest/ci/check_os.sh" % ft_utils.FUNCTEST_REPO) logger.debug("Executing command: %s" % cmd) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) diff --git a/ci/run_tests.py b/functest/ci/run_tests.py old mode 100755 new mode 100644 similarity index 100% rename from ci/run_tests.py rename to functest/ci/run_tests.py diff --git a/ci/testcases.yaml b/functest/ci/testcases.yaml similarity index 100% rename from ci/testcases.yaml rename to functest/ci/testcases.yaml diff --git a/ci/tier_builder.py b/functest/ci/tier_builder.py similarity index 100% rename from ci/tier_builder.py rename to functest/ci/tier_builder.py diff --git a/ci/tier_handler.py b/functest/ci/tier_handler.py similarity index 100% rename from ci/tier_handler.py rename to functest/ci/tier_handler.py diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py index 572012643..d331cc15a 100644 --- a/functest/cli/commands/cli_env.py +++ b/functest/cli/commands/cli_env.py @@ -19,6 +19,7 @@ FUNCTEST_REPO = ft_utils.FUNCTEST_REPO class CliEnv: + def __init__(self): pass @@ -36,7 +37,7 @@ class CliEnv: else: answer = raw_input("Invalid answer. Please type [y|n]\n") - cmd = ("python %s/ci/prepare_env.py start" % FUNCTEST_REPO) + cmd = ("python %s/functest/ci/prepare_env.py start" % FUNCTEST_REPO) ft_utils.execute_command(cmd) def show(self): diff --git a/functest/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py index 2f3f329f3..2530b5f2d 100644 --- a/functest/cli/commands/cli_os.py +++ b/functest/cli/commands/cli_os.py @@ -79,7 +79,7 @@ class CliOpenStack: def check(self): self.ping_endpoint() - cmd = ft_utils.FUNCTEST_REPO + "/ci/check_os.sh" + cmd = ft_utils.FUNCTEST_REPO + "/functest/ci/check_os.sh" ft_utils.execute_command(cmd, verbose=False) def snapshot_create(self): diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index 41b6485d9..2d4a652d8 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -439,7 +439,7 @@ def check_test_result(test_name, ret, start_time, stop_time): def get_testcases_file(): - return FUNCTEST_REPO + "/ci/testcases.yaml" + return FUNCTEST_REPO + "/functest/ci/testcases.yaml" def get_functest_yaml(): -- 2.16.6