mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-21 23:18:13 +00:00
tests: check reported version of the emulator in the upgrade_tests
This commit is contained in:
parent
ee84450fe7
commit
775f5b4e66
@ -59,6 +59,17 @@ class EmulatorWrapper:
|
||||
break
|
||||
self.client = TrezorClientDebugLink(self.transport)
|
||||
self.client.open()
|
||||
# check whether the reported version matches the expected one
|
||||
if self.tag[0] == "v":
|
||||
version = "v%d.%d.%d" % (
|
||||
self.client.features["major_version"],
|
||||
self.client.features["minor_version"],
|
||||
self.client.features["patch_version"],
|
||||
)
|
||||
assert self.tag == version, "expected: %s reported: %s" % (
|
||||
self.tag,
|
||||
version,
|
||||
)
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
|
Loading…
Reference in New Issue
Block a user