1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

feat(tests): generate UI test report again from current data

This commit is contained in:
matejcik 2021-06-21 13:55:01 +02:00 committed by matejcik
parent da4442bbd7
commit 0971adf7a7
2 changed files with 19 additions and 0 deletions

View File

@ -6,6 +6,7 @@ from contextlib import contextmanager
from pathlib import Path
import pytest
from _pytest.outcomes import Failed
from .reporting import testreport
@ -139,3 +140,18 @@ def _get_fixtures_content(fixtures: dict, remove_missing: bool):
fixtures = fixtures
return json.dumps(fixtures, indent="", sort_keys=True) + "\n"
def main():
read_fixtures()
for record in (UI_TESTS_DIR / "screens").iterdir():
if not (record / "actual").exists():
continue
try:
_process_tested(record, record.name)
print("PASSED:", record.name)
except Failed:
print("FAILED:", record.name)
testreport.index()

View File

@ -0,0 +1,3 @@
from . import main
main()