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

test(python): reduce the number of requests sent during setup #4768

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

romanz
Copy link
Contributor

@romanz romanz commented Mar 11, 2025

It helps reducing the setup time by ~1.7 seconds (per test function) when running device tests on T2T1.

Before this PR:

===================================================== slowest durations =====================================================
8.05s setup    tests/device_tests/test_basic.py::test_device_id_same
7.05s setup    tests/device_tests/test_basic.py::test_device_id_different
7.03s setup    tests/device_tests/test_basic.py::test_ping
7.03s setup    tests/device_tests/test_basic.py::test_features
7.02s setup    tests/device_tests/test_basic.py::test_capabilities
2.35s call     tests/device_tests/test_basic.py::test_device_id_different
0.46s call     tests/device_tests/test_basic.py::test_features
0.46s call     tests/device_tests/test_basic.py::test_device_id_same
0.40s call     tests/device_tests/test_basic.py::test_ping

(6 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================== 5 passed in 39.91s ====================================================

After this PR:

===================================================== slowest durations =====================================================
6.40s setup    tests/device_tests/test_basic.py::test_device_id_same
5.38s setup    tests/device_tests/test_basic.py::test_features
5.33s setup    tests/device_tests/test_basic.py::test_device_id_different
5.32s setup    tests/device_tests/test_basic.py::test_capabilities
5.28s setup    tests/device_tests/test_basic.py::test_ping
2.34s call     tests/device_tests/test_basic.py::test_device_id_different
0.46s call     tests/device_tests/test_basic.py::test_features
0.46s call     tests/device_tests/test_basic.py::test_device_id_same
0.40s call     tests/device_tests/test_basic.py::test_ping

(6 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================== 5 passed in 31.45s ====================================================

@romanz romanz self-assigned this Mar 11, 2025
@romanz romanz added tests Automated integration tests python Pull requests that update Python code labels Mar 11, 2025
Copy link

github-actions bot commented Mar 11, 2025

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@romanz romanz force-pushed the romanz/opt-setup branch from ce7e359 to fc9b6b5 Compare March 11, 2025 20:48
@romanz romanz marked this pull request as ready for review March 12, 2025 04:02
@romanz romanz requested a review from matejcik as a code owner March 12, 2025 04:02
@romanz romanz marked this pull request as draft March 12, 2025 04:03
@romanz romanz marked this pull request as ready for review March 12, 2025 05:50
@romanz
Copy link
Contributor Author

romanz commented Mar 12, 2025

T1B1 UI fixtures were updated due to PIN entry dialogs' diff:

@romanz romanz force-pushed the romanz/opt-setup branch from fc9b6b5 to b1bd574 Compare March 12, 2025 06:29
@romanz romanz changed the title test(python): don't send extra InitDevice and EndSession during setup test(python): reduce the number of requests sent during setup Mar 12, 2025
@romanz romanz added the translations Put this label on a PR to run tests in all languages label Mar 12, 2025
@romanz romanz marked this pull request as draft March 12, 2025 09:26
@romanz romanz force-pushed the romanz/opt-setup branch from 6a529ef to b1bd574 Compare March 12, 2025 09:46
@romanz romanz marked this pull request as ready for review March 12, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code tests Automated integration tests translations Put this label on a PR to run tests in all languages
Projects
Status: 🏃‍♀️ In progress
Development

Successfully merging this pull request may close these issues.

1 participant