Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an uninstall app after instrumented tests problem #1531

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jaehwa-Noh
Copy link
Contributor

What I have done and why

Fix #1530

https://issuetracker.google.com/issues/295039976
Add android.injected.androidTest.leaveApksInstalledAfterRun=true in gradle.properties.

Change-Id: I07c3e3417a9f14a7f4806d7d61c7ea7f4968ad5e
@dturner
Copy link
Collaborator

dturner commented Jul 8, 2024

Whilst this retains the original behavior of not uninstalling the demoDebug APK if it was previously installed, I wonder whether uninstalling the APK after an instrumented test is actually a problem.

In the past we've had problems with CI emulators running out of disk space, largely due to APKs not being uninstalled. I don't want to run into that again. The new behavior of uninstalling the demoDebug APK (created for the instrumented tests or not) might actually be better for this project.

Is there a specific reason why having demoDebug uninstalled is a problem?

@Jaehwa-Noh
Copy link
Contributor Author

Jaehwa-Noh commented Jul 9, 2024

@dturner Oh, I'd not followed up the out of disk space issue.
My target is making instrumented test app doesn't override the already installed app for using, and remove it after test done.

Why I do is, when we install the app aab or apk on device, and we've use that installed app for a while, and after that we ran the instrumented test on same device, the origin installed app was uninstalled.
we need to preserve installed demoDebug or whatever build variables to still remain on the device, for not install new initialized app again.

So that, I think we need to separate the installed app from the instrumented test app.

If the out of disk space problem is bigger than this, I'll close this PR and the issue.

P.S
I checked the CI, gradle.properties of CI will be overridden from ci-gradle.properties, It seems there no effects on CI, isn't it?

@Jaehwa-Noh
Copy link
Contributor Author

@dturner
Maybe the out of the space problem is related with this #1267 issue.
I think the bunch of data had been inserted again and again, over again as it ran on AndroidTest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The app uninstalled after instrumented tests
2 participants