mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
GH Actions: Fix build.sh
This commit is contained in:
16
build.sh
16
build.sh
@@ -217,20 +217,28 @@ android_test_parallel() {
|
|||||||
(
|
(
|
||||||
LOG=build/android-test-$API.log
|
LOG=build/android-test-$API.log
|
||||||
log_info "API $API: Running tests..."
|
log_info "API $API: Running tests..."
|
||||||
if android_test $API 1>$LOG 2>&1; then
|
android_test $API 1>$LOG 2>&1
|
||||||
|
ret_code=$?
|
||||||
|
if [ $ret_code = 0 ]; then
|
||||||
log_info "API $API: Passed"
|
log_info "API $API: Passed"
|
||||||
else
|
else
|
||||||
log_error "API $API: Failed"
|
log_error "API $API: Failed"
|
||||||
fi
|
fi
|
||||||
pkill -9 -f ${AVD_PREFIX}${API}
|
pkill -9 -f ${AVD_PREFIX}${API}
|
||||||
|
exit $ret_code
|
||||||
)&
|
)&
|
||||||
PIDS+=" $!"
|
PIDS+=" $!"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check exit codes
|
# Check exit codes
|
||||||
RET_CODE=0
|
success=0
|
||||||
for pid in $PIDS; do
|
for pid in $PIDS; do
|
||||||
wait $pid || RET_CODE=1
|
wait $pid
|
||||||
|
ret_code=$?
|
||||||
|
if [ $ret_code != 0 ]; then
|
||||||
|
success=1
|
||||||
|
fi
|
||||||
|
echo pid=$pid ret_code=$ret_code success=$success
|
||||||
done
|
done
|
||||||
|
|
||||||
# Print all logs
|
# Print all logs
|
||||||
@@ -240,7 +248,7 @@ android_test_parallel() {
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
done
|
done
|
||||||
|
|
||||||
return $RET_CODE
|
return $success
|
||||||
}
|
}
|
||||||
|
|
||||||
android_build() {
|
android_build() {
|
||||||
|
|||||||
Reference in New Issue
Block a user