Skip to content

Commit

Permalink
build: bump sdk/speculos versions
Browse files Browse the repository at this point in the history
- OCR fix for missing 'S' / conversion of 'I' to 'l'
- introduce odd OCR issue on nanox for 'Parsing Error ERR'
- stax snapshotting has changed slightly, required re-snapshotting images
  • Loading branch information
emturner committed Oct 4, 2023
1 parent 90c7b0e commit 9c21f8f
Show file tree
Hide file tree
Showing 52 changed files with 61 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
device: [nanos, nanosp, nanox, stax]
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:1d9f741e9bc969b072e2de53762b64993536c0f7
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.5.0
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ docker_speculos:
$(DOCKER) image tag $(LEDGERHQ)/speculos speculos

docker_ledger_app_builder:
$(DOCKER) pull $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:1d9f741e9bc969b072e2de53762b64993536c0f7
$(DOCKER) image tag $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:1d9f741e9bc969b072e2de53762b64993536c0f7 \
$(DOCKER) pull $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:3.5.0
$(DOCKER) image tag $(LEDGERHQ)/ledger-app-builder/ledger-app-builder:3.5.0 \
ledger-app-builder

docker_ledger_app_ocaml:
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.integration-tests
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/ledgerhq/speculos:sha-744f56b
FROM ghcr.io/ledgerhq/speculos:sha-6a34680

RUN apt update && \
apt install -y curl jq build-essential libsodium-dev git && \
pip install base58 pytezos && \
git clone --depth 1 --branch v1.11.1 https://github.com/ledgerHQ/ragger && \
pip install base58 pytezos pytesseract && \
git clone --depth 1 --branch v1.11.4 https://github.com/ledgerHQ/ragger && \
cd ragger && \
pip install --extra-index-url https://test.pypi.org/simple/ '.[all_backends]' && \
cd ..
Expand Down
73 changes: 24 additions & 49 deletions tests/integration/check_section_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ class Screen:
text: list[str]

def __str__(self):
return f"title=\"{self.title}\" Text=\"{''.join(self.text)}\""
return f"title=\"{self.title}\" Text=[{', '.join(self.text)}]"

def matches(self, content: str, content_lines: int, device) -> bool:
content = content.lstrip('\n')
def matches(self, content: str, content_lines: int) -> bool:
for l in self.text:
l = device_alter_content(device, l)
content = content.lstrip('\n')
print(f"l: {l}, c: {content[:len(l)]}")
if not content.startswith(l):
return False
content = content.removeprefix(l)
content = content.lstrip('\n')

return len(self.text) == content_lines or len(content) == 0
# blank content lines may not show up
return len(self.text) <= content_lines or len(content) == 0

def strip(self, content: str) -> str:
for l in self.text:
Expand Down Expand Up @@ -90,45 +91,31 @@ def check_multi_screen(url, title, content, content_lines, device):
"""Assert that the screen contents across all screens with the given title match expected content."""
while True:
def check_screen(screen):
assert screen.title == title, \
f"expected section '{title}' but on '{screen.title}'"
assert screen.matches(content, content_lines, device), \
t = title
c = content
cl = content_lines

if device == "nanox":
# Sometimes the title goes missing, along with the start of the first line.
if screen.title != title and screen.title in content[:20] and len(screen.text) == content_lines - 1:
start = content.find(screen.title)
c = content[start + len(screen.title):]
t = screen.title
cl = content_lines - 1

assert screen.title == t, f"expected section '{t}' ('{title}') but on '{screen.title}'"
assert screen.matches(c, cl), \
f"{screen} did not match {content[:10]}...{content[-10:]}"
return screen

on_screen = with_retry(url, check_screen)
content = on_screen.strip(content)
return screen.strip(c)

content = with_retry(url, check_screen)

if content == "":
break

press_right(url)

print(f'- final screen {on_screen} -')

def check_potential_remaining_screen(url, device, title, content):
"""Ignore the next blank screen on nanosp/nanox to avoid missing a potential terminal 'S'."""
# OCR issue https://github.com/LedgerHQ/speculos/issues/204
if device in ["nanosp", "nanox"] and content.endswith('S'):

def check_screen(screen):
if screen.title == title:
assert all([l == "" for l in screen.text]), f"Expected blank screen (containing only 'S'), got {screen.text}"
return screen

while True:
press_right(url)
screen = with_retry(url, check_screen)
if screen.title != title:
break

def check_back(screen):
assert screen.title == title

press_left(url)
# wait until we are back on last page of content
with_retry(url, check_back)

def device_content_lines(device: str) -> int:
if device == "nanos":
return 1
Expand All @@ -137,17 +124,6 @@ def device_content_lines(device: str) -> int:

raise ValueError(f"unsupported device '{device}'")

def device_alter_content(device: str, content: str) -> str:
if device == "nanos":
return content
if device in ["nanosp", "nanox"]:
# OCR issue https://github.com/LedgerHQ/speculos/issues/204
content = content.replace('S', '')
content = content.replace('I', 'l')
return content

raise ValueError(f"unsupported device '{device}'")

if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Check a section of pages contain the expected content.")
parser.add_argument("-d", "--device", help="device type: nanos | nanosp", required=True)
Expand All @@ -157,7 +133,6 @@ def device_alter_content(device: str, content: str) -> str:
args = parser.parse_args()

content_lines = device_content_lines(args.device)
content = device_alter_content(args.device, args.expected_content)
content = args.expected_content

check_multi_screen(args.url, args.title, content, content_lines, args.device)
check_potential_remaining_screen(args.url, args.device, args.title, args.expected_content)
4 changes: 2 additions & 2 deletions tests/integration/nanosp/regression_potential_empty_screen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
start_speculos "$seed"
expect_full_text 'Tezos Wallet' 'ready for' 'safe signing'
send_async_apdus \
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f8100890300000000000000000000000000000000000000000000000000000000000000009e00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e02030400000002037a0000000a076501000000013100020000ffdd6102321bc251e4a5190ad5b12b251069d9b4010100000000000000000000000000000000000000000000000008530a0a530a530a53 "expect_apdu_return ba220e5b9af0fa350d127665049ef6dcc85304a6bd62fcc5e4f12752092af1f703399e1639e7884f86b83714e5eea2acdc56d3449f029e7258ef3bbbd35f449105d9545c3c62f7ffa088d3dfebcfa38cd316e2b4d4067cf288e9e275b8fe69019000"
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f8100890300000000000000000000000000000000000000000000000000000000000000009e00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e02030400000002037a0000000a076501000000013100020000ffdd6102321bc251e4a5190ad5b12b251069d9b4010100000000000000000000000000000000000000000000000008530a0a530a530a53 "expect_apdu_return ba220e5b9af0fa350d127665049ef6dcc85304a6bd62fcc5e4f12752092af1f703399e1639e7884f86b83714e5eea2acdc56d3449f029e7258ef3bbbd35f449105d9545c3c62f7ffa088d3dfebcfa38cd316e2b4d4067cf288e9e275b8fe69019000"
expect_section_content nanosp 'Operation (0)' 'Transfer ticket'
press_button right
expect_section_content nanosp 'Fee' '0.01 tz'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ send_async_apdus \
800f8200502000040743036c030b07430359030a074303680100000009225c365f340a246b25074303680100000024635e31225c3f45795f31214556627e393b45583b59550a234b6a325a54386860552158200345 "expect_apdu_return dcba96786c40c7894527a85050bc0b75eaee37aa020a52c634275450018da47822d552099146915f4c3280b3dbd4ab5d459b96b585247e58fda9bf53c9951dbe017811d074e688f11d8f47ce7f94c0548dca76be9ae9e87df794d3facdb4bb0a9000
"

expect_full_text 'Expression' '{lF_NONE {{WAP;lF {DlP {{DROP 1;PUH unit Unit;PUH bool True;PUH string "'
press_button right
expect_full_text 'Expression' ';L\\?p$-Fq)VDg\n]te\no4v0_8)\""}}} {{DROP 2;PUH unit Unit;PUH bool False;'
press_button right
expect_full_text 'Expression' 'PUH string "Li-%*edF6~?E[5Kmu?dyviwJ^2\"\\d$FyQ>>!>D$g(Qg";PUH string "*Tx'
press_button right
expect_full_text 'Expression' '<E`iG6Yf*A^kZ\\=7?H[mOlQ\n]Ehs"}}}} {lF_NONE {DUP} {{DROP 4;PUH unit Unit;'
press_button right
expect_full_text 'Expression' 'PUH bool True;PUH string "\"\\6_4\n$k%";PUH string "c^1\"\\?Ey_1!EVb~9;EX'
press_button right
expect_full_text 'Expression' ';YU\n#Kj2ZT8h`U!X "}}};lZE}'
press_button right
expect_section_content nanosp \
'Expression' \
'{IF_NONE {{SWAP;IF {DIP {{DROP 1;PUSH unit Unit;PUSH bool True;PUSH string ";L\\S?p$-Fq)VDg\n]te\no4v0_8)\""}}} {{DROP 2;PUSH unit Unit;PUSH bool False;PUSH string "Li-%*edF6~?E[5Kmu?dyviwJ^2\"\\d$FyQ>>!>D$g(Qg";PUSH string "*Tx<E`SiG6Yf*A^kZ\\=7?H[mOlQ\n]Ehs"}}}} {IF_NONE {DUP} {{DROP 4;PUSH unit Unit;PUSH bool True;PUSH string "\"\\6_4\n$k%";PUSH string "c^1\"\\?Ey_1!EVb~9;EX;YU\n#Kj2ZT8h`U!X "}}};SIZE}'

press_button right
expect_full_text 'Accept?' 'Press both buttons to accept.'
press_button both
expect_async_apdus_sent
8 changes: 4 additions & 4 deletions tests/integration/nanosp/test_blindsign_too_deep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ expect_full_text 'Tezos Wallet' 'ready for' 'safe signing'
press_button right
expect_full_text 'Tezos Wallet' 'ready for' 'BLIND signing'
send_async_apdus \
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000 "expect_apdu_return 9000" \
800f82001211020000000c02000000070200000002002a "expect_apdu_return 93070b00990e4cf29c31f6497307bea0ad86a9d0dc08dba8b607e8dc0e23652f8309e41ed87ac1d33006806b688cfcff7632c4fbe499ff3ea4983ae4f06dea7790ec25db045689bca2c63967b5c563aabff86c4ef163bff92af3bb2ca9392d099000"
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000 "expect_apdu_return 9000" \
800f82001211020000000c02000000070200000002002a "expect_apdu_return 93070b00990e4cf29c31f6497307bea0ad86a9d0dc08dba8b607e8dc0e23652f8309e41ed87ac1d33006806b688cfcff7632c4fbe499ff3ea4983ae4f06dea7790ec25db045689bca2c63967b5c563aabff86c4ef163bff92af3bb2ca9392d099000"
expect_full_text 'Sign Hash' Micheline expression
press_button right
expect_full_text 'Sign Hash' AtwAJe8iMNaJwdugjXmGWQM8Z2dznb215smWzkLY3qY
expect_full_text 'Sign Hash' AtwAJe8iMNaJwdugjXmGWQM8Z2dznb215smWzkSLY3qY
press_button right
expect_full_text 'Accept?' 'Press both buttons to accept.'
press_button both
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/nanosp/test_blindsign_too_large.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ expect_full_text 'Tezos Wallet' 'ready for' 'safe signing'
press_button right
expect_full_text 'Tezos Wallet' 'ready for' 'BLIND signing'
send_async_apdus \
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a "expect_apdu_return ef565fa445d815cd77518a4d14ce90b7a536627455f0930c9dbfa22a75d478d83e2bcb333ba0d639dd28c1b77c5860e552ab02092a50a57f1424f573278230ab8ba81d8a40956415278a27e3f28cae64d1f1f13bf613e6e9a57035e9e14511029000"
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a "expect_apdu_return ef565fa445d815cd77518a4d14ce90b7a536627455f0930c9dbfa22a75d478d83e2bcb333ba0d639dd28c1b77c5860e552ab02092a50a57f1424f573278230ab8ba81d8a40956415278a27e3f28cae64d1f1f13bf613e6e9a57035e9e14511029000"
expect_full_text 'Sign Hash' Micheline expression
press_button right
expect_full_text 'Sign Hash' H7Gq5omPmhFhDPeyywQsb5Mmt2fiBwsgwvuNXzu18Xq
expect_full_text 'Sign Hash' H7Gq5omPmhFhDPeyywQsSb5Mmt2fiBwsgwvuNXzu18Xq
press_button right
expect_full_text 'Accept?' 'Press both buttons to accept.'
press_button both
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/nanosp/test_tz2_sign_micheline_basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ expect_full_text "Tezos Wallet" "ready for" "safe signing"
send_apdu 800f000111048000002c800006c18000000080000000
expect_apdu_return 9000
send_apdu 800f81012305020000001d0100000004434143410100000004504f504f0100000006424f5544494e
expect_full_text Expression '{"CACA";"POPO";"BOUDlN"}'
expect_full_text Expression '{"CACA";"POPO";"BOUDIN"}'
press_button right
expect_full_text "Accept?" "Press both buttons to accept."
press_button both
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/nanox/test_blindsign_too_deep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ expect_full_text 'Tezos Wallet' 'ready for' 'safe signing'
press_button right
expect_full_text 'Tezos Wallet' 'ready for' 'BLIND signing'
send_async_apdus \
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000 "expect_apdu_return 9000" \
800f82001211020000000c02000000070200000002002a "expect_apdu_return 93070b00990e4cf29c31f6497307bea0ad86a9d0dc08dba8b607e8dc0e23652f8309e41ed87ac1d33006806b688cfcff7632c4fbe499ff3ea4983ae4f06dea7790ec25db045689bca2c63967b5c563aabff86c4ef163bff92af3bb2ca9392d099000"
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000 "expect_apdu_return 9000" \
800f82001211020000000c02000000070200000002002a "expect_apdu_return 93070b00990e4cf29c31f6497307bea0ad86a9d0dc08dba8b607e8dc0e23652f8309e41ed87ac1d33006806b688cfcff7632c4fbe499ff3ea4983ae4f06dea7790ec25db045689bca2c63967b5c563aabff86c4ef163bff92af3bb2ca9392d099000"
expect_full_text 'Sign Hash' Micheline expression
press_button right
expect_full_text 'Sign Hash' AtwAJe8iMNaJwdugjXmGWQM8Z2dznb215smWzkLY3qY
expect_full_text 'Sign Hash' AtwAJe8iMNaJwdugjXmGWQM8Z2dznb215smWzkSLY3qY
press_button right
expect_full_text 'Accept?' 'Press both buttons to accept.'
press_button both
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/nanox/test_blindsign_too_large.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ expect_full_text 'Tezos Wallet' 'ready for' 'safe signing'
press_button right
expect_full_text 'Tezos Wallet' 'ready for' 'BLIND signing'
send_async_apdus \
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a "expect_apdu_return ef565fa445d815cd77518a4d14ce90b7a536627455f0930c9dbfa22a75d478d83e2bcb333ba0d639dd28c1b77c5860e552ab02092a50a57f1424f573278230ab8ba81d8a40956415278a27e3f28cae64d1f1f13bf613e6e9a57035e9e14511029000"
800f000011048000002c800006c18000000080000000 "expect_apdu_return 9000" \
800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a "expect_apdu_return ef565fa445d815cd77518a4d14ce90b7a536627455f0930c9dbfa22a75d478d83e2bcb333ba0d639dd28c1b77c5860e552ab02092a50a57f1424f573278230ab8ba81d8a40956415278a27e3f28cae64d1f1f13bf613e6e9a57035e9e14511029000"
expect_full_text 'Sign Hash' Micheline expression
press_button right
expect_full_text 'Sign Hash' H7Gq5omPmhFhDPeyywQsb5Mmt2fiBwsgwvuNXzu18Xq
expect_full_text 'Sign Hash' H7Gq5omPmhFhDPeyywQsSb5Mmt2fiBwsgwvuNXzu18Xq
press_button right
expect_full_text 'Accept?' 'Press both buttons to accept.'
press_button both
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/nanox/test_tz2_sign_micheline_basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ expect_full_text "Tezos Wallet" "ready for" "safe signing"
send_apdu 800f000111048000002c800006c18000000080000000
expect_apdu_return 9000
send_apdu 800f81012305020000001d0100000004434143410100000004504f504f0100000006424f5544494e
expect_full_text Expression '{"CACA";"POPO";"BOUDlN"}'
expect_full_text Expression '{"CACA";"POPO";"BOUDIN"}'
press_button right
expect_full_text "Accept?" "Press both buttons to accept."
press_button both
Expand Down
Binary file modified tests/integration/stax/snapshots/address_rejected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/address_verified.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/home_bs_enabled_blindsign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/home_bs_enabled_clearsign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/loading_operation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_0_sr_outbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_0_transaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_amount_0.24tz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_entrypoint_do.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_fee_0.01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_fee_0.05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_parameter_CAR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_proof_396...834_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_rollup_sr163L...v57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_sign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/stax/snapshots/operation_storage_limit_4.png
Binary file modified tests/integration/stax/snapshots/operation_storage_limit_45.png
Binary file modified tests/integration/stax/snapshots/reject_review.png
Binary file modified tests/integration/stax/snapshots/request_blindsign_manager.png
Binary file modified tests/integration/stax/snapshots/review_blindsign_approve.png
Binary file modified tests/integration/stax/snapshots/review_blindsign_manager_basic.png
Binary file modified tests/integration/stax/snapshots/review_request_sign_operation.png
Binary file modified tests/integration/stax/snapshots/screen_show_address_tz1_zebra.png
Binary file modified tests/integration/stax/snapshots/screen_verify_address.png
Binary file modified tests/integration/stax/snapshots/settings_blindsigning_off.png
Binary file modified tests/integration/stax/snapshots/settings_blindsigning_on.png
Binary file modified tests/integration/stax/snapshots/signing_successful.png
Binary file modified tests/integration/stax/snapshots/skip_to_signing.png
2 changes: 1 addition & 1 deletion tests/integration/stax/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ragger.firmware.stax.layouts import ChoiceList
from ragger.firmware.stax.positions import BUTTON_LOWER_LEFT, BUTTON_LOWER_RIGHT, BUTTON_ABOVE_LOWER_MIDDLE

MAX_ATTEMPTS = 100
MAX_ATTEMPTS = 50

SCREEN_HOME_DEFAULT = "home"
SCREEN_INFO_PAGE = "info"
Expand Down
10 changes: 8 additions & 2 deletions tests/integration/test_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ attempts() {
}

compare_strings() {
STR1="$(echo $1 | sed 's/I/l/g; s/S//g')"
STR2="$(echo $2 | sed 's/I/l/g; s/S//g')"
STR1="$1"
STR2="$2"

if [ "nanox" = "$TARGET" ]; then
# TODO: raise issue on speculos?
STR1="$(echo $1 | sed 's/Parsing errorERR//g')"
STR2="$(echo $2 | sed 's/Parsing errorERR//g')"
fi

[ "$STR1" = "$STR2" ]
}
Expand Down

0 comments on commit 9c21f8f

Please sign in to comment.