diff options
author | 2016-03-09 12:31:52 +0200 | |
---|---|---|
committer | 2016-03-09 22:31:25 +0000 | |
commit | 09647d0fde0467343e0740a01d77cc20e7a39837 (patch) | |
tree | 698d47a670a4f36707f80287a6b18fefc5341f6e /jjb/functest/functest-ci-jobs.yml | |
parent | bc15ead7ab50ff1f6d39793072fbc3d090ede2a0 (diff) |
Refined syntax for handling run_tests.sh parameters
Change-Id: I9475d279e5e72717221aacd618e07628386d6d41
Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
Diffstat (limited to 'jjb/functest/functest-ci-jobs.yml')
-rw-r--r-- | jjb/functest/functest-ci-jobs.yml | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index 9ec4268c0..90b5a67d4 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -211,12 +211,10 @@ - shell: | #!/bin/bash set +e - flag="-s" - if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then - flag=$flag" -r" - fi + flags="-s" + [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r" echo "Functest: run $FUNCTEST_SUITE_NAME" - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flag}" + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flags}" container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -226,11 +224,9 @@ - shell: | #!/bin/bash set +e - flag="-s" - if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then - flag=$flag" -r" - fi - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flag}" + flags="-s" + [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r" + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flags}" container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd |