mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Added retry in bash script
This commit is contained in:
parent
6012c2320e
commit
1105752564
@ -2,9 +2,21 @@
|
||||
|
||||
adb logcat -c
|
||||
adb logcat *:E -v color &
|
||||
if ./gradlew jacocoInstrumentationTestReport; then
|
||||
echo "jacocoInstrumentationTestReport succeeded" >&2
|
||||
else
|
||||
adb exec-out screencap -p >screencap.png
|
||||
exit 1
|
||||
fi
|
||||
retry=0
|
||||
while [ $retry -le 3 ]
|
||||
do
|
||||
if ./gradlew jacocoInstrumentationTestReport; then
|
||||
echo "jacocoInstrumentationTestReport succeeded" >&2
|
||||
break
|
||||
else
|
||||
adb kill-server
|
||||
adb start-server
|
||||
adb logcat -c
|
||||
./gradlew clean
|
||||
retry=$(( $retry + 1 ))
|
||||
if [ $retry == 3 ]; then
|
||||
adb exec-out screencap -p >screencap.png
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user