From ff9c82ebb8bccd76c0c2b7249dc69b2f93878f5b Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Fri, 3 May 2024 16:50:46 +0530 Subject: [PATCH] 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. --- contrib/instrumentation.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/instrumentation.sh b/contrib/instrumentation.sh index 7a488a5d6..df4bacbdc 100644 --- a/contrib/instrumentation.sh +++ b/contrib/instrumentation.sh @@ -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 ))