Fixed: Ci is continuously failing.

* Modified the `instrumentation.sh` script to delete the app if already installed in the device before running the test cases.
This commit is contained in:
MohitMaliFtechiz 2024-05-03 16:50:46 +05:30
parent 6656d94115
commit ff9c82ebb8

View File

@ -13,8 +13,8 @@ is_app_installed() {
}
if is_app_installed; then
# Clear application data to properly run the test cases.
adb shell pm clear "${PACKAGE_NAME}"
# Delete the application to properly run the test cases.
adb uninstall "${PACKAGE_NAME}"
fi
retry=0
while [ $retry -le 3 ]; do
@ -31,8 +31,8 @@ while [ $retry -le 3 ]; do
adb logcat *:E -v color &
if is_app_installed; then
# Clear application data to properly run the test cases.
adb shell pm clear "${PACKAGE_NAME}"
# Delete the application to properly run the test cases.
adb uninstall "${PACKAGE_NAME}"
fi
./gradlew clean
retry=$(( retry + 1 ))