From 366a3ab085336f18c24e66a11ce29b7b62bf2b07 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 23 Sep 2018 10:38:19 +0200 Subject: Fix Functest return values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current impl doesn't exit as expected when running both tiers and testcases [1][2]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/324/console [2] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-fraser/284/console Change-Id: I934c3f54313522011ed87ebebe77fbb285b8ab49 Signed-off-by: Cédric Ollivier --- jjb/functest/functest-alpine.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'jjb') diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 4e23d44fe..c82147489 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -26,14 +26,10 @@ check_os_deployment() { } - run_tiers() { tiers=$1 cmd_opt="run_tests -r -t all" [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all" - ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" - echo 0 > ${ret_val_file} - for tier in ${tiers[@]}; do FUNCTEST_IMAGE=${REPO}/functest-${tier}:${DOCKER_TAG} echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." @@ -55,8 +51,6 @@ run_tiers() { run_test() { test_name=$1 cmd_opt="run_tests -t ${test_name}" - ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" - echo 0 > ${ret_val_file} # Determine which Functest image should be used for the test case case ${test_name} in connection_check|tenantnetwork1|tenantnetwork2|vmready1|vmready2|singlevm1|singlevm2|vping_ssh|vping_userdata|cinder_test|odl|api_check|snaps_health_check) @@ -158,6 +152,9 @@ fi volumes="${images_vol} ${results_vol} ${sshkey_vol} ${userconfig_vol} ${rc_file_vol} ${cacert_file_vol}" +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo 0 > ${ret_val_file} + set +e if [ ${FUNCTEST_MODE} == 'testcase' ]; then -- cgit 1.2.3-korg