Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blindsign enabled splash screen #230

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,43 +175,36 @@ re-run the test normally afterwards, to ensure the snapshots have been set corre

#### Preparation

First, start a container for running individual tests:
First start the app in a terminal using following command:

```sh
docker run --rm -it --entrypoint /bin/bash -v $(pwd):/app --network host \
ledger-app-tezos-integration-tests

cd /app/tests/integration/stax
export PORT=5000

git config --global --add safe.directory /app
. ../app_vars.sh
make app_stax_dbg.tgz
TARGET=stax ./scripts/run_app.sh
```
You should be able to see the stax display on your screen.

Before running the test, start the app in a separate container (as each test will quit the app):
Open a new terminal for running tests, run following commands to setup test environment

```sh
make app_stax_dbg.tgz

TARGET=stax ./scripts/run_app.sh
$ docker exec -it ledger-app-tezos-integration-tests bash;
<docker>$ export PORT=5000
<docker>$ . tests/integration/app_vars.sh
```

You can view/interact with the app using a vnc client on port `41000`.

#### Running

You can run an individual test from the test container. You should see the app progress on the vnc viewer.
You can run an individual test from the test container. You should see the app progress on the display.

```sh
./<test_name>.py
./tests/integration/stax/<test_name>.py
```

#### Setting goldimages

You can reset/set goldimages using the following:

```sh
GOLDEN=1 ./<test_name>.py
GOLDEN=1 ./tests/integration/stax/<test_name>.py
```

If you are resetting goldimages for multiple tests, you can also use `export NOQUIT=1` to keep the app
Expand Down
10 changes: 2 additions & 8 deletions scripts/run_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,5 @@ seed="zebra`for i in $(seq 1 23) ; do echo -n ' zebra' ; done`"

set -e


docker run --rm -it -v "$(realpath .):/app" \
--entrypoint=/bin/sh ledger-app-tezos-integration-tests \
-c " apk add gmp-dev curl jq libsodium-dev git xxd procps libvncserver; \
python3 -m venv tezos_test_env --system-site-package; \
source ./tezos_test_env/bin/activate; \
python3 -m pip install -r tests/requirements.txt -q;
python3 -m speculos --display=headless --seed \"$seed\" -m $TARGET app/bin/app.elf"
docker run --rm -it --user $(id -u):$(id -g) --privileged -e DISPLAY=$DISPLAY -v '/dev/bus/usb:/dev/bus/usb' -v '/tmp/.X11-unix:/tmp/.X11-unix' -v $(pwd):/app --entrypoint=/bin/bash --name ledger-app-tezos-integration-tests ledger-app-tezos-integration-tests -c \
"speculos --model $TARGET app/bin/app.elf"
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.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading