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

Implement setting and clearing debug app #234

Merged

Conversation

bacecek
Copy link
Contributor

@bacecek bacecek commented Mar 27, 2024

A bit more information here:
https://developer.android.com/tools/adb#am

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement labels Mar 27, 2024
@bacecek
Copy link
Contributor Author

bacecek commented Mar 27, 2024

Looks like the problem in tests is timeout and it should be increased
DeepSource shows problems that occur in whole codebase, so it's not only my PR problem
And the error in installation verification action is error: The 'psutil' distribution was not found and is required by adb-enhanced, which is also not seems to be my PR problem

@ashishb
Copy link
Owner

ashishb commented Apr 3, 2024

Thanks for the contribution.

Please ignore DeepSource shows problems that occur in whole codebase, so it's not only my PR problem - I disabled it already.

And the error in installation verification action is error: The 'psutil' distribution was not found and is required by adb-enhanced, which is also not seems to be my PR problem

This is a weird issue that happens on my PRs as well!

Looks like the problem in tests is timeout and it should be increased

I will increase the timeouts.
I think the timeouts are reflective of existing cached AVDs that have been evicted.

adbe/adb_enhanced.py Show resolved Hide resolved
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 3, 2024
@ashishb
Copy link
Owner

ashishb commented Apr 7, 2024

@bacecek why would this test be so slow
692.69s call tests/adbe_tests.py::test_debug_app
Reference: https://github.com/ashishb/adb-enhanced/actions/runs/8588180300/job/23532695878?pr=234

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 7, 2024
@bacecek
Copy link
Contributor Author

bacecek commented Apr 7, 2024

@bacecek why would this test be so slow 692.69s call tests/adbe_tests.py::test_debug_app Reference: https://github.com/ashishb/adb-enhanced/actions/runs/8588180300/job/23532695878?pr=234

Oh, 11 minutes, this is insane.
On my computer and API 21 emulator it works well (about 5 seconds).
I will try to remove some tests.

@bacecek bacecek force-pushed the users/bacecek/set_and_clear_debug_app branch 2 times, most recently from 787b005 to 7011c8a Compare April 7, 2024 20:49
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Apr 7, 2024
@bacecek bacecek force-pushed the users/bacecek/set_and_clear_debug_app branch from 7011c8a to e8fc365 Compare April 7, 2024 21:38
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 7, 2024
@bacecek bacecek force-pushed the users/bacecek/set_and_clear_debug_app branch from e8fc365 to 991d4b3 Compare April 7, 2024 21:50
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Apr 7, 2024
@bacecek
Copy link
Contributor Author

bacecek commented Apr 7, 2024

@ashishb Are there any differences in emulator set up for AdbeInstallTests and AdbeUnitTests checks?
I see that two checks on API 21 emulators takes different times to run:
https://github.com/ashishb/adb-enhanced/actions/runs/8591828733/job/23541084021?pr=234 - it's ok
https://github.com/ashishb/adb-enhanced/actions/runs/8591828735/job/23541083983?pr=234 - it timeouts on my tests.
Do you have any ideas?

@ashishb
Copy link
Owner

ashishb commented Apr 7, 2024

This is much faster than earlier but I still wonder why this call is so slow.

107.13s call tests/adbe_tests.py::test_debug_app_set_fail - https://github.com/ashishb/adb-enhanced/actions/runs/8592107146/job/23541680568?pr=234

I see that two checks on API 21 emulators takes different times to run:

Fixed in #241

@bacecek
Copy link
Contributor Author

bacecek commented Apr 8, 2024

This is much faster than earlier but I still wonder why this call is so slow.

I'll try to have a look

@bacecek bacecek force-pushed the users/bacecek/set_and_clear_debug_app branch 2 times, most recently from b79853e to c9df1a6 Compare April 8, 2024 09:35
@bacecek bacecek force-pushed the users/bacecek/set_and_clear_debug_app branch from c9df1a6 to 90abcbd Compare April 8, 2024 09:47
@bacecek bacecek force-pushed the users/bacecek/set_and_clear_debug_app branch from 90abcbd to 30ce0b4 Compare April 8, 2024 09:48
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 8, 2024
@bacecek
Copy link
Contributor Author

bacecek commented Apr 8, 2024

Unfortunately, I have no idea why tests setting -p and -w flags and trying to set non existence app takes so much time. On my local machine they all takes less than a second to run. And as I can see, there is a different behavior on different API versions, so maybe it's a problem of the exact emulator.
I left single test that checks plain set and clear.

@ashishb ashishb merged commit e9eb030 into ashishb:master Apr 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants