mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-03 11:20:59 +00:00
feat(ci): run core device test with multicore support
Tests are much quicker. Max amount of cores chosen as 4, bigger values were sometimes unstable. [no changelog]
This commit is contained in:
parent
d633fa885b
commit
6a51351983
@ -58,8 +58,9 @@ core device test:
|
|||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
variables:
|
variables:
|
||||||
TREZOR_PROFILING: 1
|
TREZOR_PROFILING: 1
|
||||||
|
MULTICORE: 4 # more could interfere with other jobs
|
||||||
script:
|
script:
|
||||||
- $NIX_SHELL --run "poetry run make -C core test_emu_ui | ts -s"
|
- $NIX_SHELL --run "poetry run make -C core test_emu_ui_multicore | ts -s"
|
||||||
after_script:
|
after_script:
|
||||||
- mv core/src/.coverage core/.coverage.test_emu
|
- mv core/src/.coverage core/.coverage.test_emu
|
||||||
- mv tests/ui_tests/reports/test/ test_ui_report
|
- mv tests/ui_tests/reports/test/ test_ui_report
|
||||||
|
@ -60,6 +60,8 @@ PYTEST = pytest --junitxml=$(JUNIT_XML)
|
|||||||
TREZOR_FIDO2_UDP_PORT = 21326
|
TREZOR_FIDO2_UDP_PORT = 21326
|
||||||
RUST_TARGET=$(shell rustc -vV | sed -n 's/host: //p')
|
RUST_TARGET=$(shell rustc -vV | sed -n 's/host: //p')
|
||||||
|
|
||||||
|
MULTICORE ?= "auto"
|
||||||
|
|
||||||
## help commands:
|
## help commands:
|
||||||
|
|
||||||
help: ## show this help
|
help: ## show this help
|
||||||
@ -90,7 +92,7 @@ test_emu: ## run selected device tests from python-trezor
|
|||||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS)
|
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS)
|
||||||
|
|
||||||
test_emu_multicore: ## run device tests using multiple cores
|
test_emu_multicore: ## run device tests using multiple cores
|
||||||
$(PYTEST) -n auto $(TESTPATH)/device_tests $(TESTOPTS) --control-emulators --model=core --random-order-seed=$(shell echo $$RANDOM)
|
$(PYTEST) -n $(MULTICORE) $(TESTPATH)/device_tests $(TESTOPTS) --control-emulators --model=core --random-order-seed=$(shell echo $$RANDOM)
|
||||||
|
|
||||||
test_emu_monero: ## run selected monero device tests from monero-agent
|
test_emu_monero: ## run selected monero device tests from monero-agent
|
||||||
cd tests ; $(EMU_TEST) ./run_tests_device_emu_monero.sh $(TESTOPTS)
|
cd tests ; $(EMU_TEST) ./run_tests_device_emu_monero.sh $(TESTOPTS)
|
||||||
@ -114,7 +116,7 @@ test_emu_ui: ## run ui integration tests
|
|||||||
--ui=test --ui-check-missing --record-text-layout
|
--ui=test --ui-check-missing --record-text-layout
|
||||||
|
|
||||||
test_emu_ui_multicore: ## run ui integration tests using multiple cores
|
test_emu_ui_multicore: ## run ui integration tests using multiple cores
|
||||||
$(PYTEST) -n auto $(TESTPATH)/device_tests $(TESTOPTS) \
|
$(PYTEST) -n $(MULTICORE) $(TESTPATH)/device_tests $(TESTOPTS) \
|
||||||
--ui=test --ui-check-missing --record-text-layout \
|
--ui=test --ui-check-missing --record-text-layout \
|
||||||
--control-emulators --model=core --random-order-seed=$(shell echo $$RANDOM)
|
--control-emulators --model=core --random-order-seed=$(shell echo $$RANDOM)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user