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>
fi
cmd_opt='prepare_env start && run_tests -r -t all'
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}
for tier in ${tiers[@]}; do
FUNCTEST_IMAGE=opnfv/functest-${tier}
cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
echo "Running Functest tier '${tier}'. CMD: ${cmd}"
eval ${cmd}
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
- 'functest-cleanup'
- 'functest-daily'
- 'functest-store-results'
- 'functest-cleanup'
- 'functest-daily'
- 'functest-store-results'
- builder:
name: functest-arm-daily-builder
- builder:
name: functest-arm-daily-builder