diff options
author | 2017-09-20 09:15:42 +0200 | |
---|---|---|
committer | 2017-09-20 09:33:20 +0200 | |
commit | b9ed2db97d34f790bd2db34ece1e4044d55ca339 (patch) | |
tree | 541eb9677987d7c616b83c1edbf3e82a8b0aabdd /jjb/functest | |
parent | 55746e543b9a56d7648d28620db90688cc2ed3d8 (diff) |
Add functest return status in Alpines
So far we had 2 approaches:
* return Functest CI status: can be OK even if tests are FAIL
* return Functest Test status: can be FAIL even if all Functest tests are OK
(Fail in onboaraded tests)
A 3rd way is possible thanks to [1].
We consider only Functest status and Functest tests for the return statement
the return will be FAIL only if
* error in the framework
* error in Functest Tests
So concretely, if promise, Doctor can be FAIL, if Functest tests are OK, the
return will be PASS
[1]: https://gerrit.opnfv.org/gerrit/#/c/42245/
Change-Id: I6c7fbe99d888e43700ddb2dfc9bfd6cc9bfbaed6
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'jjb/functest')
-rwxr-xr-x | jjb/functest/functest-alpine.sh | 6 | ||||
-rw-r--r-- | jjb/functest/functest-daily-jobs.yml | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 81aee0d9c..c9484304f 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -86,6 +86,8 @@ else fi cmd_opt='prepare_env start && run_tests -r -t all' +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo 0 > ${ret_val_file} for tier in ${tiers[@]}; do FUNCTEST_IMAGE=opnfv/functest-${tier} @@ -94,4 +96,8 @@ for tier in ${tiers[@]}; do cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest tier '${tier}'. CMD: ${cmd}" eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo ${ret_value} > ${ret_val_file} + fi done diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index 0d504f3d8..ea39de44b 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -380,6 +380,7 @@ - 'functest-cleanup' - 'functest-daily' - 'functest-store-results' + - 'functest-exit' - builder: name: functest-arm-daily-builder |