-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Zondax/dev
New Release
- Loading branch information
Showing
147 changed files
with
589 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,40 @@ | ||
TESTS_ZEMU_DIR?=$(CURDIR)/tests_zemu | ||
TESTS_JS_PACKAGE = "@zondax/ledger-ironfish" | ||
TESTS_JS_DIR = $(CURDIR)/js | ||
|
||
.PHONY: build | ||
build: | ||
cargo ledger build nanosplus | ||
cargo ledger build stax | ||
cargo ledger build flex | ||
|
||
.PHONY: setup | ||
setup: | ||
cargo ledger setup | ||
ifeq ($(BOLOS_SDK),) | ||
# In this case, there is not predefined SDK and we run dockerized | ||
# When not using the SDK, we override and build the XL complete app | ||
PRODUCTION_BUILD ?= 1 | ||
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk | ||
|
||
.PHONY: format | ||
format: | ||
cargo fmt --all | ||
|
||
# To be run on linux only | ||
.PHONY: lint-all | ||
lint-all: lint-nanosplus lint-flex lint-stax lint-nanox | ||
|
||
.PHONY: lint-nanosplus | ||
lint-nanosplus: | ||
cargo clippy --target nanosplus -- -Dwarnings | ||
|
||
.PHONY: lint-nanox | ||
lint-nanox: | ||
cargo clippy --target nanox -- -Dwarnings | ||
|
||
.PHONY: lint-flex | ||
lint-flex: | ||
cargo clippy --target flex -- -Dwarnings | ||
|
||
.PHONY: lint-stax | ||
lint-stax: | ||
cargo clippy --target stax -- -Dwarnings | ||
|
||
|
||
.PHONY: zemu_install_js_link | ||
ifeq ($(TESTS_JS_DIR),) | ||
zemu_install_js_link: | ||
@echo "No local package defined" | ||
else | ||
zemu_install_js_link: | ||
# First unlink everything | ||
cd $(TESTS_JS_DIR) && yarn unlink || true | ||
cd $(TESTS_ZEMU_DIR) && yarn unlink $(TESTS_JS_PACKAGE) || true | ||
# Now build and link | ||
cd $(TESTS_JS_DIR) && yarn install && yarn build && yarn link || true | ||
cd $(TESTS_ZEMU_DIR) && yarn link $(TESTS_JS_PACKAGE) && yarn install || true | ||
@echo | ||
# List linked packages | ||
@echo | ||
@cd $(TESTS_ZEMU_DIR) && ( ls -l node_modules ; ls -l node_modules/@* ) | grep ^l || true | ||
@echo | ||
default: | ||
$(MAKE) -C app | ||
%: | ||
$(info "Calling app Makefile for target $@") | ||
COIN=$(COIN) $(MAKE) -C app $@ | ||
endif | ||
|
||
|
||
|
||
zemu_install_ironfish_link: | ||
cd ironfish && yarn unlink || true | ||
cd $(TESTS_ZEMU_DIR) && yarn unlink @ironfish/rust-nodejs || true | ||
# Now build and link | ||
cd ironfish && yarn install && cd ironfish-rust-nodejs && yarn link || true | ||
cd $(TESTS_ZEMU_DIR) && yarn link @ironfish/rust-nodejs || true | ||
|
||
# Redefine zemu_install, as we still need to compile the ironfish package locally | ||
.PHONY: zemu_install | ||
zemu_install: zemu_install_ironfish_link zemu_install_js_link | ||
# and now install everything | ||
cd $(TESTS_ZEMU_DIR) && yarn install | ||
|
||
|
||
.PHONY: zemu_test | ||
zemu_test: | ||
cd $(TESTS_ZEMU_DIR) && yarn test | ||
# Copy files quickly from a source to a folder with a regular expresions | ||
# In some cases, when something change in the screens for some command, it changes for each participant. | ||
# This makes it hard and tedious to update each participant snapshots (one per test run). | ||
# This allows to quickly update the other images from the first run | ||
.PHONY: copy-files | ||
copy-files: | ||
find . -type d -name "*sp-*" -exec cp ../snapshots-tmp/sp-dkg-p2-m2-0-identity/00003.png {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
target | ||
app.json | ||
app_nanos.json | ||
app_nanosplus.json | ||
app_nanox.json | ||
app_stax.json | ||
app_flex.json | ||
|
||
# Temporary directory with snapshots taken during test runs | ||
tests/snapshots-tmp/ | ||
|
||
# Python | ||
*.pyc[cod] | ||
*.egg | ||
__pycache__/ | ||
*.egg-info/ | ||
.eggs/ | ||
.python-version | ||
|
||
# Related to the Ledger VSCode extension | ||
# Virtual env for sideload (macOS and Windows) | ||
ledger/ | ||
# Build directory | ||
build/ | ||
|
||
.idea | ||
.vscode | ||
tmp | ||
.DS_Store | ||
|
||
bin/*.elf | ||
bin/*.apdu | ||
bin/*.hex | ||
|
||
pkg/*.sh | ||
output/*.elf | ||
output/*.apdu | ||
output/*.hex |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.