mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-05 06:12:34 +00:00
parent
034947985a
commit
9add2b0027
@ -18,7 +18,6 @@ def fetch_recorded(hash: str, path: Path) -> None:
|
|||||||
zip_dest = path / "recorded.zip"
|
zip_dest = path / "recorded.zip"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print("downloading", zip_src)
|
|
||||||
urllib.request.urlretrieve(zip_src, zip_dest)
|
urllib.request.urlretrieve(zip_src, zip_dest)
|
||||||
except urllib.error.HTTPError:
|
except urllib.error.HTTPError:
|
||||||
raise RuntimeError(f"No such recorded collection was found on '{zip_src}'.")
|
raise RuntimeError(f"No such recorded collection was found on '{zip_src}'.")
|
||||||
|
@ -234,14 +234,21 @@ def create_reports() -> None:
|
|||||||
added(path, test_name)
|
added(path, test_name)
|
||||||
|
|
||||||
for test_name, (master_hash, current_hash) in diff_tests.items():
|
for test_name, (master_hash, current_hash) in diff_tests.items():
|
||||||
with tmpdir() as master_screens:
|
with tmpdir() as master_root:
|
||||||
|
master_screens = master_root / "downloaded"
|
||||||
|
master_screens.mkdir()
|
||||||
|
try:
|
||||||
download.fetch_recorded(master_hash, master_screens)
|
download.fetch_recorded(master_hash, master_screens)
|
||||||
|
except RuntimeError as e:
|
||||||
|
print("WARNING:", e)
|
||||||
|
|
||||||
current_screens = SCREENS_DIR / test_name / "actual"
|
current_screens = SCREENS_DIR / test_name / "actual"
|
||||||
if not current_screens.exists():
|
if not current_screens.exists():
|
||||||
raise RuntimeError(
|
print("WARNING: Folder does not exist, did the test run?")
|
||||||
"Folder does not exist, did the test run?", current_screens
|
print(current_screens)
|
||||||
)
|
current_screens = master_root / "empty_current_screens"
|
||||||
|
current_screens.mkdir()
|
||||||
|
|
||||||
diff(
|
diff(
|
||||||
master_screens,
|
master_screens,
|
||||||
current_screens,
|
current_screens,
|
||||||
|
Loading…
Reference in New Issue
Block a user