From b6fc1f82ba30e2c3707e5011ca21a16f8fa0641e Mon Sep 17 00:00:00 2001 From: Sergey Kolekonov Date: Wed, 11 Mar 2015 19:12:48 +0300 Subject: [PATCH] Fix status check procedure Currently this functions can set build status to failed by mistake due to error in code checking function Change-Id: I28411be2ada27417466a18eee349231246978079 --- slave-scripts/functions.sh | 4 ++-- slave-scripts/tempest.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slave-scripts/functions.sh b/slave-scripts/functions.sh index 43d13dd1..d722b317 100644 --- a/slave-scripts/functions.sh +++ b/slave-scripts/functions.sh @@ -278,7 +278,7 @@ run_tests() { vanilla2) if [[ "$JOB_NAME" =~ scenario ]]; then tox -e scenario $TESTS_CONFIG_FILE | tee tox.log - STATUS=$(grep "\ -\ Failed" tox.log | awk -F ':' '{print $2}') + STATUS=$(grep "\ -\ Failed" tox.log | awk '{print $3}') else tox -e integration -- vanilla2 --concurrency=1 STATUS=$? @@ -295,7 +295,7 @@ run_tests() { spark) if [[ "$JOB_NAME" =~ scenario ]]; then tox -e scenario $TESTS_CONFIG_FILE | tee tox.log - STATUS=$(grep "\ -\ Failed" tox.log | awk -F ':' '{print $2}') + STATUS=$(grep "\ -\ Failed" tox.log | awk '{print $3}') else tox -e integration -- spark --concurrency=1 STATUS=$? diff --git a/slave-scripts/tempest.sh b/slave-scripts/tempest.sh index 4d0afce6..91efc040 100644 --- a/slave-scripts/tempest.sh +++ b/slave-scripts/tempest.sh @@ -61,7 +61,7 @@ write_sahara_main_conf $SAHARA_PATH/etc/sahara/sahara.conf start_sahara $SAHARA_PATH/etc/sahara/sahara.conf tox -e all -- tempest.scenario.data_processing.client_tests | tee tox.log -STATUS=$(grep "\ -\ Failed" tox.log | awk -F ':' '{print $2}') +STATUS=$(grep "\ -\ Failed" tox.log | awk '{print $3}') mv logs $WORKSPACE print_python_env $WORKSPACE