1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

ci: update CI config, enable click UI tests

[no changelog]
This commit is contained in:
matejcik 2023-01-30 14:41:09 +01:00 committed by matejcik
parent 795fa3e7e2
commit ed16fefae7
4 changed files with 46 additions and 30 deletions

View File

@ -13,6 +13,7 @@ core unix coverage posttest:
COVERAGE_THRESHOLD: "78" COVERAGE_THRESHOLD: "78"
<<: *gitlab_caching <<: *gitlab_caching
needs: needs:
- core click test
- core device test - core device test
- core monero test - core monero test
- core u2f test - core u2f test
@ -34,11 +35,12 @@ unix ui changes:
- master - master
<<: *gitlab_caching <<: *gitlab_caching
needs: needs:
- core click test
- core device test - core device test
- legacy device test - legacy device test
script: script:
- nix-shell --run "cd tests/ui_tests ; poetry run python reporting/report_master_diff.py TT_ T1_" - nix-shell --run "poetry run python -m tests.ui_tests.reporting master-diff"
- mv tests/ui_tests/reporting/reports/master_diff/ . - mv tests/ui_tests/reports/master_diff .
artifacts: artifacts:
name: core-unix-ui-changes name: core-unix-ui-changes
paths: paths:

View File

@ -60,11 +60,11 @@ core device test:
TREZOR_PROFILING: 1 TREZOR_PROFILING: 1
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 | ts -s"
- mv core/src/.coverage core/.coverage.test_emu
after_script: after_script:
- mv tests/ui_tests/reporting/reports/test/ test_ui_report - mv core/src/.coverage core/.coverage.test_emu
- nix-shell --run "poetry run python ci/prepare_ui_artifacts.py TT | ts -s" - mv tests/ui_tests/reports/test/ test_ui_report
- diff tests/ui_tests/fixtures.json tests/ui_tests/fixtures.suggestion.json - nix-shell --run "poetry run python ci/prepare_ui_artifacts.py | ts -s"
- diff -u tests/ui_tests/fixtures.json tests/ui_tests/fixtures.suggestion.json
artifacts: artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA" name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths: paths:
@ -266,11 +266,22 @@ core click test:
<<: *gitlab_caching <<: *gitlab_caching
needs: needs:
- core unix frozen debug build - core unix frozen debug build
variables:
TREZOR_PROFILING: 1
script: script:
- nix-shell --run "poetry run make -C core test_emu_click | ts -s" - nix-shell --run "poetry run make -C core test_emu_click_ui | ts -s"
after_script:
- mv core/src/.coverage core/.coverage.test_click
- mv tests/ui_tests/reports/test/ test_ui_report
- nix-shell --run "poetry run python ci/prepare_ui_artifacts.py | ts -s"
- diff -u tests/ui_tests/fixtures.json tests/ui_tests/fixtures.suggestion.json
artifacts: artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA" name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths: paths:
- ci/ui_test_records/
- test_ui_report
- tests/ui_tests/screens/
- tests/ui_tests/fixtures.suggestion.json
- tests/trezor.log - tests/trezor.log
- tests/junit.xml - tests/junit.xml
reports: reports:
@ -433,9 +444,9 @@ legacy device test:
script: script:
- nix-shell --run "poetry run make -C legacy test_emu_ui | ts -s" - nix-shell --run "poetry run make -C legacy test_emu_ui | ts -s"
after_script: after_script:
- mv tests/ui_tests/reporting/reports/test/ test_ui_report - mv tests/ui_tests/reports/test/ test_ui_report
- nix-shell --run "poetry run python ci/prepare_ui_artifacts.py T1 | ts -s" - nix-shell --run "poetry run python ci/prepare_ui_artifacts.py | ts -s"
- diff tests/ui_tests/fixtures.json tests/ui_tests/fixtures.suggestion.json - diff -u tests/ui_tests/fixtures.json tests/ui_tests/fixtures.suggestion.json
artifacts: artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA" name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths: paths:

View File

@ -106,6 +106,9 @@ test_emu_fido2: ## run fido2 device tests
test_emu_click: ## run click tests test_emu_click: ## run click tests
$(EMU_TEST) $(PYTEST) $(TESTPATH)/click_tests $(TESTOPTS) $(EMU_TEST) $(PYTEST) $(TESTPATH)/click_tests $(TESTOPTS)
test_emu_click_ui: ## run click tests with UI testing
$(EMU_TEST) $(PYTEST) $(TESTPATH)/click_tests --ui=test --ui-check-missing $(TESTOPTS)
test_emu_ui: ## run ui integration tests test_emu_ui: ## run ui integration tests
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS) \ $(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS) \
--ui=test --ui-check-missing --ui=test --ui-check-missing

View File

@ -177,46 +177,46 @@ FIDO2 device tests.
Click tests. Click tests.
See [docs/tests/click-tests](../tests/click-tests.md) for more info. See [docs/tests/click-tests](../tests/click-tests.md) for more info.
### [core click asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L281) ### [core click asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L292)
### [core upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L302) ### [core upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L313)
Upgrade tests. Upgrade tests.
See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info. See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
### [core upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L321) ### [core upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L332)
### [core persistence test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L343) ### [core persistence test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L354)
Persistence tests. Persistence tests.
### [core persistence asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L359) ### [core persistence asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L370)
### [core hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L377) ### [core hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L388)
### [crypto test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L395) ### [crypto test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L406)
### [legacy device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L426) ### [legacy device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L437)
### [legacy asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L453) ### [legacy asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L464)
### [legacy btconly test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L465) ### [legacy btconly test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L476)
### [legacy btconly asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L485) ### [legacy btconly asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L496)
### [legacy upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L500) ### [legacy upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L511)
### [legacy upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L519) ### [legacy upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L530)
### [legacy hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L540) ### [legacy hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L551)
### [python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L559) ### [python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L570)
### [python support test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L578) ### [python support test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L589)
### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L588) ### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L599)
### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L612) ### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L623)
### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L636) ### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L647)
--- ---
## TEST-HW stage - [test-hw.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml) ## TEST-HW stage - [test-hw.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml)
@ -258,7 +258,7 @@ Consists of **2 jobs** below:
### [core unix coverage posttest](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml#L10) ### [core unix coverage posttest](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml#L10)
### [unix ui changes](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml#L31) ### [unix ui changes](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml#L32)
--- ---
## DEPLOY stage - [deploy.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml) ## DEPLOY stage - [deploy.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml)