diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-01-15 15:37:28 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-01-15 15:03:57 +0000 |
commit | 3065ed6a59f40cd0cf5c7f1e8b91e059166c10b9 (patch) | |
tree | c34e9220c9575b359503841afda6417097b12da8 | |
parent | 1a68a503cd0bf148e8c3b2aec9289f1604ee1fea (diff) |
Remove extra output if CI_DEBUG is false
This way we have a nicer view in Jenkins when
preparing Functest
Change-Id: Ie0df3aa8b07ac2fd726d11b1ab01a7291d4c2c5e
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
(cherry picked from commit 973c722f929eb3652d19a15911404f31a9f66216)
-rwxr-xr-x | docker/run_tests.sh | 6 | ||||
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/clean_openstack.py | 3 | ||||
-rwxr-xr-x | testcases/config_functest.py | 12 |
3 files changed, 15 insertions, 6 deletions
diff --git a/docker/run_tests.sh b/docker/run_tests.sh index 4fd505bbd..f4e178882 100755 --- a/docker/run_tests.sh +++ b/docker/run_tests.sh @@ -40,15 +40,19 @@ else fi function clean_openstack(){ + echo -e "\n\nCleaning Openstack environment..." python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py \ --debug + echo -e "\n\n" } function run_test(){ test_name=$1 + echo "" echo "----------------------------------------------" - echo "------------- Running $i test case " + echo " Running test case: $i" echo "----------------------------------------------" + echo "" case $test_name in "vping") info "Running vPing test..." diff --git a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py index eab89d22d..866e3a822 100644 --- a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py +++ b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py @@ -69,7 +69,7 @@ default_users = defaults_yaml.get(installer).get("users") default_tenants = defaults_yaml.get(installer).get("tenants") def separator(): - logger.debug("-------------------------------------------") + logger.info("-------------------------------------------") def remove_instances(nova_client): logger.info("Removing Nova instances...") @@ -375,7 +375,6 @@ def main(): logger.error("Please source the openrc credentials and run the script again.") exit(-1) - remove_instances(nova_client) separator() remove_images(nova_client) diff --git a/testcases/config_functest.py b/testcases/config_functest.py index 116825800..199fadfde 100755 --- a/testcases/config_functest.py +++ b/testcases/config_functest.py @@ -125,7 +125,10 @@ def action_start(): script += 'bundle install' cmd = "/bin/bash -c '" + script + "'" - functest_utils.execute_command(cmd,logger) + if os.environ.get("CI_DEBUG") == "false": + functest_utils.execute_command(cmd) + else: + functest_utils.execute_command(cmd,logger) # Create result folder under functest if necessary if not os.path.exists(RALLY_RESULT_DIR): @@ -208,7 +211,7 @@ def action_clean(): logger.debug("Cleaning up the OpenStack deployment...") cmd='python ' + REPO_PATH + \ - '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py -d ' + '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py' functest_utils.execute_command(cmd,logger) logger.info("Functest environment clean!") @@ -221,7 +224,10 @@ def install_rally(): logger.debug("Executing %s/install_rally.sh..." %RALLY_REPO_DIR) install_script = RALLY_REPO_DIR + "/install_rally.sh --yes" cmd = 'sudo ' + install_script - functest_utils.execute_command(cmd,logger) + if os.environ.get("CI_DEBUG") == "false": + functest_utils.execute_command(cmd) + else: + functest_utils.execute_command(cmd,logger) logger.debug("Creating Rally environment...") cmd = "rally deployment create --fromenv --name="+DEPLOYMENT_MAME |