2019-08-19 12:24:32 +00:00
|
|
|
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
|
|
|
|
|
|
|
|
# Core
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core unit test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix regular build
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core device ui test:
|
2019-12-09 16:01:04 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-12-09 16:01:04 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix frozen debug build
|
2019-12-09 16:01:04 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu_ui
|
2020-03-04 12:33:34 +00:00
|
|
|
- cd ..
|
|
|
|
- mv tests/ui_tests/reporting/reports/test/ test_ui_report
|
|
|
|
- pipenv run python ci/prepare_ui_artifacts.py
|
2019-12-09 16:01:04 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 16:01:04 +00:00
|
|
|
paths:
|
2020-01-06 14:59:12 +00:00
|
|
|
- ci/ui_test_records/
|
2020-03-04 12:33:34 +00:00
|
|
|
- test_ui_report
|
2020-03-03 14:50:57 +00:00
|
|
|
- tests/ui_tests/screens/
|
2020-01-07 11:53:50 +00:00
|
|
|
- tests/junit.xml
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2020-01-03 13:49:35 +00:00
|
|
|
when: always
|
2019-12-09 16:01:04 +00:00
|
|
|
expire_in: 1 week
|
2020-01-07 11:53:50 +00:00
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
2019-12-09 16:01:04 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core device test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix frozen debug build
|
2019-05-27 12:17:43 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_PROFILING: 1
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu
|
2019-05-27 12:17:43 +00:00
|
|
|
- mv ./src/.coverage .coverage.test_emu
|
2019-12-09 08:28:28 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 08:28:28 +00:00
|
|
|
paths:
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2020-01-02 17:55:37 +00:00
|
|
|
- tests/junit.xml
|
2019-05-27 12:17:43 +00:00
|
|
|
- core/.coverage.*
|
2019-12-09 08:28:28 +00:00
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2020-01-02 17:55:37 +00:00
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
2019-08-19 12:24:32 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core btconly device test:
|
2019-08-22 18:18:44 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-08-22 18:18:44 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix frozen btconly debug build
|
2019-08-22 18:18:44 +00:00
|
|
|
variables:
|
2020-01-16 14:42:41 +00:00
|
|
|
MICROPYTHON: "build/unix/micropython-bitcoinonly"
|
2019-08-22 18:18:44 +00:00
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu
|
2019-12-09 08:28:28 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 08:28:28 +00:00
|
|
|
paths:
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2020-01-02 17:55:37 +00:00
|
|
|
- tests/junit.xml
|
2019-12-09 08:28:28 +00:00
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2020-01-02 17:55:37 +00:00
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
2019-08-22 18:18:44 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core monero test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-08-19 12:24:32 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix frozen debug build
|
2020-02-11 10:17:31 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_PROFILING: 1
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu_monero
|
2020-02-11 10:17:31 +00:00
|
|
|
- mv ./src/.coverage .coverage.test_emu_monero
|
2019-12-09 08:28:28 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 08:28:28 +00:00
|
|
|
paths:
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2020-02-11 10:17:31 +00:00
|
|
|
- core/.coverage.*
|
2019-12-09 08:28:28 +00:00
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-08-19 12:24:32 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core u2f test:
|
2019-09-14 12:47:30 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-09-14 12:47:30 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix frozen debug build
|
2019-05-27 12:17:43 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_PROFILING: 1
|
2019-09-14 12:47:30 +00:00
|
|
|
script:
|
2019-09-14 12:59:11 +00:00
|
|
|
- make -C tests/fido_tests/u2f-tests-hid
|
2019-09-14 12:47:30 +00:00
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu_u2f
|
2019-05-27 12:17:43 +00:00
|
|
|
- mv ./src/.coverage .coverage.test_emu_u2f
|
2019-12-09 08:28:28 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 08:28:28 +00:00
|
|
|
paths:
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2019-05-27 12:17:43 +00:00
|
|
|
- core/.coverage.*
|
2019-12-09 08:28:28 +00:00
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-09-14 12:47:30 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core fido2 test:
|
2019-10-18 13:35:45 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-10-18 13:35:45 +00:00
|
|
|
dependencies:
|
2020-01-17 14:46:59 +00:00
|
|
|
- core unix frozen debug build
|
2019-05-27 12:17:43 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_PROFILING: 1
|
2019-10-18 13:35:45 +00:00
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu_fido2
|
2019-05-27 12:17:43 +00:00
|
|
|
- mv ./src/.coverage .coverage.test_emu_fido2
|
2019-12-09 08:28:28 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 08:28:28 +00:00
|
|
|
paths:
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2020-01-02 17:55:37 +00:00
|
|
|
- tests/junit.xml
|
2019-05-27 12:17:43 +00:00
|
|
|
- core/.coverage.*
|
2019-12-09 08:28:28 +00:00
|
|
|
expire_in: 1 week
|
2020-01-02 17:55:37 +00:00
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-10-18 13:35:45 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core click test:
|
2019-10-25 12:03:44 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-10-25 12:03:44 +00:00
|
|
|
dependencies:
|
|
|
|
- core unix frozen debug build
|
|
|
|
script:
|
|
|
|
- cd core
|
|
|
|
- pipenv run make test_emu_click
|
2019-12-09 08:28:28 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2019-12-09 08:28:28 +00:00
|
|
|
paths:
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2020-01-02 17:55:37 +00:00
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
2019-12-09 08:28:28 +00:00
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-10-25 12:03:44 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core upgrade test:
|
2019-09-09 14:03:32 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-09-09 14:03:32 +00:00
|
|
|
dependencies:
|
|
|
|
- core unix frozen debug build
|
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "core"
|
|
|
|
script:
|
2019-09-12 13:42:40 +00:00
|
|
|
- tests/download_emulators.sh
|
2020-01-02 17:55:37 +00:00
|
|
|
- pipenv run pytest --junitxml=tests/junit.xml tests/upgrade_tests
|
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-09-09 14:03:32 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core persistence test:
|
2019-10-25 12:03:44 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .core_job
|
2019-10-25 12:03:44 +00:00
|
|
|
dependencies:
|
|
|
|
- core unix frozen debug build
|
|
|
|
script:
|
2020-01-02 17:55:37 +00:00
|
|
|
- pipenv run pytest --junitxml=tests/junit.xml tests/persistence_tests
|
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-10-25 12:03:44 +00:00
|
|
|
|
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
|
2020-01-02 17:55:37 +00:00
|
|
|
- ITERS=10 pipenv run pytest --junitxml=tests/junit.xml tests
|
2019-08-30 14:57:49 +00:00
|
|
|
- CK_TIMEOUT_MULTIPLIER=20 valgrind -q --error-exitcode=1 ./tests/test_check
|
2020-01-02 17:55:37 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-08-19 12:24:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Legacy
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
legacy test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .legacy_job
|
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
|
2020-01-02 17:55:37 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-08-19 12:24:32 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
legacy btconly test:
|
2019-08-22 18:18:44 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .legacy_job
|
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
|
2020-01-02 17:55:37 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2020-01-02 17:55:37 +00:00
|
|
|
|
2019-08-22 18:18:44 +00:00
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
legacy upgrade test:
|
2019-09-09 14:03:32 +00:00
|
|
|
stage: test
|
2020-02-10 15:59:18 +00:00
|
|
|
extends: .legacy_job
|
2019-09-09 14:03:32 +00:00
|
|
|
dependencies:
|
|
|
|
- legacy emu regular build
|
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "legacy"
|
|
|
|
script:
|
2019-09-12 13:42:40 +00:00
|
|
|
- tests/download_emulators.sh
|
2020-01-02 17:55:37 +00:00
|
|
|
- pipenv run pytest --junitxml=tests/junit.xml tests/upgrade_tests
|
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-09-09 14:03:32 +00:00
|
|
|
|
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
|
2020-01-28 15:24:58 +00:00
|
|
|
dependencies: []
|
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
|
2020-01-02 17:55:37 +00:00
|
|
|
artifacts:
|
2020-04-07 08:42:45 +00:00
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
2020-01-02 17:55:37 +00:00
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2019-10-04 13:22:39 +00:00
|
|
|
|
|
|
|
# Hardware
|
|
|
|
hardware legacy device test:
|
|
|
|
stage: test
|
|
|
|
extends: .legacy_job
|
2020-04-08 16:28:15 +00:00
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
2020-04-09 12:08:56 +00:00
|
|
|
- /^legacy\//
|
|
|
|
- /^release\//
|
2019-10-04 13:22:39 +00:00
|
|
|
tags:
|
|
|
|
- tpmb
|
|
|
|
dependencies:
|
|
|
|
- legacy fw debug build
|
|
|
|
script:
|
|
|
|
- cd ci/hardware_tests
|
|
|
|
- nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start"
|
|
|
|
- nix-shell --run "cd ../.. && pipenv sync"
|
|
|
|
- nix-shell --run "pipenv run python bootstrap.py"
|
|
|
|
- nix-shell --run "pipenv run python bootstrap.py ../../trezor-*.bin"
|
|
|
|
- nix-shell --run "pipenv run pytest ../../tests/device_tests"
|
|
|
|
- nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} stop"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- ci/hardware_tests/video*.mp4
|
|
|
|
expire_in: 2 days
|