mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-30 09:11:07 +00:00
tests/upgrade: add support for filenames with revision
This commit is contained in:
parent
b780785beb
commit
a443a4a430
@ -54,7 +54,7 @@ def get_tags():
|
||||
result = defaultdict(list)
|
||||
for f in sorted(files):
|
||||
try:
|
||||
# example: "trezor-emu-core-v2.1.1"
|
||||
# example: "trezor-emu-core-v2.1.1" or "trezor-emu-core-v2.1.1-46ab42fw"
|
||||
_, _, gen, tag = f.name.split("-", maxsplit=3)
|
||||
result[gen].append(tag)
|
||||
except ValueError:
|
||||
|
@ -79,7 +79,10 @@ def for_all(*args, legacy_minimum_version=(1, 0, 0), core_minimum_version=(2, 0,
|
||||
try:
|
||||
for tag in ALL_TAGS[gen]:
|
||||
if tag.startswith("v"):
|
||||
tag_version = tuple(int(n) for n in tag[1:].split("."))
|
||||
tag_version = tag[1:]
|
||||
if "-" in tag: # contains revision
|
||||
tag_version = tag[1:-9]
|
||||
tag_version = tuple(int(n) for n in tag_version.split("."))
|
||||
if tag_version < minimum_version:
|
||||
continue
|
||||
all_params.append((gen, tag))
|
||||
|
Loading…
Reference in New Issue
Block a user