Skip to content

Commit f936c99

Browse files
authored
Fix Android emulator test
Fix error like https://github.com/pytorch/executorch/actions/runs/13336349752/job/37254365102 Uninstall existing apk first.
1 parent 184dd40 commit f936c99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/run_android_emulator.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ $ADB_PATH wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; d
1818
echo "List all running emulators"
1919
$ADB_PATH devices
2020

21+
adb uninstall com.example.executorchllamademo || true
22+
adb uninstall com.example.executorchllamademo.test || true
2123
adb install -t app-debug.apk
2224
adb install -t app-debug-androidTest.apk
2325

@@ -26,6 +28,8 @@ adb push model.pte /data/local/tmp/llama
2628
adb push tokenizer.bin /data/local/tmp/llama
2729
adb shell am instrument -w -r com.example.executorchllamademo.test/androidx.test.runner.AndroidJUnitRunner
2830

31+
adb uninstall org.pytorch.executorch || true
32+
adb uninstall org.pytorch.executorch.test || true
2933
adb install -t android-test-debug.apk
3034
adb install -t android-test-debug-androidTest.apk
3135

0 commit comments

Comments
 (0)