ci/android: fix exit code from android-cts-runner.sh and android-deqp-runner.sh
The android-cts-runner.sh and android-deqp-runner.sh scripts are usually sourced from android-runner.sh which then propagates the EXIT_CODE value set in the scripts. However this scheme does not cover the case where android-cts-runner.sh and android-deqp-runner.sh are called directly, in that case they will not return the previously saved EXIT_CODE appropriately in the last command. Fix that, allowing developers to call the scripts directly with the intended behavior. After this change android-runner.sh does not need to know about the EXIT_CODE variable anymore, which was a slight layering violation, but it can just rely on the exit code of the last executed commands. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36286>
This commit is contained in:
committed by
Marge Bot
parent
8d98bf289d
commit
8f2715c333
@@ -72,3 +72,5 @@ if [ -n "${ARTIFACTS_BASE_URL:-}" ]; then
|
||||
fi
|
||||
|
||||
section_end android_cts_test
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
||||
@@ -108,3 +108,5 @@ $ADB shell "cd ${AOSP_RESULTS}/..; \
|
||||
$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
|
||||
|
||||
section_end cuttlefish_results
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
||||
@@ -139,12 +139,10 @@ if [ "$OLD_SF_PID" == "$NEW_SF_PID" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# These should be the last commands of the script in order to correctly
|
||||
# propagate the exit code.
|
||||
if [ -n "${ANDROID_CTS_TAG:-}" ]; then
|
||||
# The script sets EXIT_CODE
|
||||
. "$(dirname "$0")/android-cts-runner.sh"
|
||||
else
|
||||
# The script sets EXIT_CODE
|
||||
. "$(dirname "$0")/android-deqp-runner.sh"
|
||||
fi
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
||||
Reference in New Issue
Block a user