Files
app-ethereum/tests/speculos
Alexandre Paillier 1cf39711b8 Fix Speculos tests
2023-02-20 17:01:57 +01:00
..
2022-07-25 11:42:45 +02:00
2022-07-25 11:40:52 +02:00
2022-07-04 12:40:14 +02:00
2022-06-28 15:11:20 +02:00
2023-02-20 17:01:57 +01:00
2022-09-15 16:49:20 +02:00
2022-07-25 10:39:42 +02:00
2022-06-28 15:11:20 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:26:02 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00

Speculos functional tests

These tests are implemented in Python with the SpeculosClient interface which allows easy execution on the Speculos emulator.

Requirements

Dependencies

Python dependencies are listed in requirements.txt

python3 -m pip install --extra-index-url https://test.pypi.org/simple/ -r requirements.txt

The extra index allows to fetch the latest version of Speculos.

Usage

Compilation app

Go to the root of the repository:

make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOX_SDK
mv bin/app.elf tests/speculos/<some name>.elf

Given the requirements are installed, just do (by default command):

cd tests/speculos/
pytest

Custom options

  • --model: "nanos", "nanox", "nanosp" | default: "nanos"
  • --display: "qt", "headless" | default: "qt"
  • --path: the path of the binary app | default: path of makefile compilation

Example

With nanox binary app:

# the --path is variable to where you put your binary

pytest --model nanox --path ./elfs/nanox.elf

# Execute specific test:
pytest --model nanox --path ./elfs/nanox.elf test_pubkey_cmd.py