1
0
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:
Pavol Rusnak 2019-09-10 21:14:44 +02:00
parent ee84450fe7
commit 775f5b4e66
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -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):