2019-08-19 12:24:32 +00:00
|
|
|
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
|
|
|
|
|
2019-09-05 15:44:55 +00:00
|
|
|
.only_changes_core: &only_changes_core
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ci/**/*
|
|
|
|
- common/**/*
|
|
|
|
- core/**/*
|
|
|
|
- crypto/**/*
|
|
|
|
- python/**/*
|
|
|
|
- storage/**/*
|
|
|
|
- tests/**/*
|
|
|
|
- tools/**/*
|
|
|
|
- vendor/**/*
|
|
|
|
|
|
|
|
.only_changes_legacy: &only_changes_legacy
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ci/**/*
|
|
|
|
- common/**/*
|
|
|
|
- crypto/**/*
|
|
|
|
- legacy/**/*
|
|
|
|
- python/**/*
|
|
|
|
- storage/**/*
|
|
|
|
- tests/**/*
|
|
|
|
- tools/**/*
|
|
|
|
- vendor/**/*
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
|
2019-08-19 12:24:32 +00:00
|
|
|
# Core
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
core unix unit test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
<<: *only_changes_core
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- core unix frozen regular build
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
core unix device test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
<<: *only_changes_core
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- core unix frozen regular build
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
core unix btconly device test:
|
2019-08-22 18:18:44 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
<<: *only_changes_core
|
2019-08-22 18:18:44 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- core unix frozen btconly build
|
2019-08-22 18:18:44 +00:00
|
|
|
variables:
|
|
|
|
MICROPYTHON: "../build/unix/micropython-bitcoinonly"
|
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
core unix monero test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
<<: *only_changes_core
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- core unix frozen regular build
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu_monero
|
|
|
|
|
2019-09-09 14:03:32 +00:00
|
|
|
core unix upgrade test:
|
|
|
|
stage: test
|
|
|
|
<<: *only_changes_core
|
|
|
|
dependencies:
|
|
|
|
- core unix frozen debug build
|
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "core"
|
|
|
|
script:
|
|
|
|
- tests/upgrade_tests/download_emulators.sh
|
|
|
|
- pipenv run pytest tests/upgrade_tests
|
|
|
|
|
2019-08-19 12:24:32 +00:00
|
|
|
|
|
|
|
# Crypto
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
crypto test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ci/**/*
|
|
|
|
- crypto/**/*
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- crypto build
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd crypto
|
|
|
|
- ./tests/aestst
|
|
|
|
- ./tests/test_check
|
|
|
|
- ./tests/test_openssl 1000
|
|
|
|
- ITERS=10 pipenv run pytest tests
|
2019-08-30 14:57:49 +00:00
|
|
|
- CK_TIMEOUT_MULTIPLIER=20 valgrind -q --error-exitcode=1 ./tests/test_check
|
2019-08-19 12:24:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Legacy
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
legacy emu test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
<<: *only_changes_legacy
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- legacy emu regular build
|
2019-08-19 12:24:32 +00:00
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
script:
|
|
|
|
- cd legacy
|
|
|
|
- pipenv run script/test
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
legacy emu btconly test:
|
2019-08-22 18:18:44 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
<<: *only_changes_legacy
|
2019-08-22 18:18:44 +00:00
|
|
|
dependencies:
|
2019-09-04 08:53:40 +00:00
|
|
|
- legacy emu btconly build
|
2019-08-22 18:18:44 +00:00
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf"
|
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
|
|
|
- cd legacy
|
|
|
|
- pipenv run script/test
|
|
|
|
|
2019-09-09 14:03:32 +00:00
|
|
|
legacy emu upgrade test:
|
|
|
|
stage: test
|
|
|
|
<<: *only_changes_legacy
|
|
|
|
dependencies:
|
|
|
|
- legacy emu regular build
|
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "legacy"
|
|
|
|
script:
|
|
|
|
- tests/upgrade_tests/download_emulators.sh
|
|
|
|
- pipenv run pytest tests/upgrade_tests
|
|
|
|
|
2019-08-19 12:24:32 +00:00
|
|
|
|
|
|
|
# Python
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
python test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ci/**/*
|
2019-09-09 13:51:44 +00:00
|
|
|
- common/**/*
|
2019-09-05 15:44:55 +00:00
|
|
|
- python/**/*
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd python
|
|
|
|
- pipenv run tox
|
|
|
|
|
|
|
|
|
|
|
|
# Storage
|
|
|
|
|
2019-09-04 08:53:40 +00:00
|
|
|
storage test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2019-09-05 15:44:55 +00:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ci/**/*
|
|
|
|
- storage/**/*
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies: []
|
|
|
|
script:
|
|
|
|
- cd storage/tests
|
|
|
|
- pipenv run make build
|
|
|
|
- pipenv run make tests_all
|