mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +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
|
break
|
||||||
self.client = TrezorClientDebugLink(self.transport)
|
self.client = TrezorClientDebugLink(self.transport)
|
||||||
self.client.open()
|
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
|
return self
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_value, traceback):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
|
Loading…
Reference in New Issue
Block a user