2020-06-07 19:49:06 +00:00
|
|
|
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/trezor-firmware-env.nix
|
2019-08-19 12:24:32 +00:00
|
|
|
|
2021-11-24 12:24:10 +00:00
|
|
|
# Caching
|
|
|
|
.gitlab_caching: &gitlab_caching
|
|
|
|
cache:
|
|
|
|
key: "$CI_COMMIT_REF_SLUG"
|
|
|
|
paths:
|
|
|
|
- .venv/
|
|
|
|
|
2019-08-19 12:24:32 +00:00
|
|
|
# Core
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core unit test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix regular build
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C core test | ts -s"
|
2021-09-08 12:16:40 +00:00
|
|
|
- nix-shell --run "poetry run make -C core test_rust | ts -s"
|
2021-09-22 16:15:40 +00:00
|
|
|
- nix-shell --run "poetry run make -C core clippy | ts -s"
|
2019-08-19 12:24:32 +00:00
|
|
|
|
2022-01-10 16:20:42 +00:00
|
|
|
core unit test asan:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix regular asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
RUSTC_BOOTSTRAP: "1"
|
|
|
|
RUSTFLAGS: "-Z sanitizer=address"
|
2022-01-10 17:58:12 +00:00
|
|
|
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
|
2022-01-10 16:20:42 +00:00
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run make -C core test | ts -s"
|
|
|
|
- nix-shell --run "poetry run make -C core test_rust | ts -s"
|
|
|
|
- nix-shell --run "poetry run make -C core clippy | ts -s"
|
|
|
|
|
2021-11-03 19:02:38 +00:00
|
|
|
core unit test t1:
|
|
|
|
stage: test
|
2022-01-10 16:20:42 +00:00
|
|
|
<<: *gitlab_caching
|
2021-11-03 19:02:38 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen btconly debug t1 build
|
|
|
|
variables:
|
|
|
|
BITCOIN_ONLY: "1"
|
|
|
|
TREZOR_MODEL: "1"
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run make -C core test_rust | ts -s"
|
|
|
|
|
2022-02-08 12:46:18 +00:00
|
|
|
core device test:
|
2019-12-09 16:01:04 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
2022-02-08 12:46:18 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_PROFILING: 1
|
2019-12-09 16:01:04 +00:00
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C core test_emu_ui | ts -s"
|
2022-02-08 12:46:18 +00:00
|
|
|
- mv core/src/.coverage core/.coverage.test_emu
|
2020-04-16 15:47:42 +00:00
|
|
|
after_script:
|
2020-03-04 12:33:34 +00:00
|
|
|
- mv tests/ui_tests/reporting/reports/test/ test_ui_report
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run python ci/prepare_ui_artifacts.py | ts -s"
|
2020-09-29 17:53:28 +00:00
|
|
|
- diff tests/ui_tests/fixtures.json tests/ui_tests/fixtures.suggestion.json
|
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-09-29 17:53:28 +00:00
|
|
|
- tests/ui_tests/fixtures.suggestion.json
|
2020-01-07 11:53:50 +00:00
|
|
|
- tests/junit.xml
|
2020-01-16 16:17:41 +00:00
|
|
|
- tests/trezor.log
|
2019-05-27 12:17:43 +00:00
|
|
|
- core/.coverage.*
|
2020-01-03 14:26:12 +00:00
|
|
|
when: always
|
2022-02-08 12:46:18 +00:00
|
|
|
expire_in: 1 week
|
2020-01-02 17:55:37 +00:00
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
2019-08-19 12:24:32 +00:00
|
|
|
|
2022-01-07 12:07:45 +00:00
|
|
|
core device asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core btconly device test:
|
2019-08-22 18:18:44 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen btconly debug build
|
2019-08-22 18:18:44 +00:00
|
|
|
variables:
|
2020-07-27 14:59:51 +00:00
|
|
|
MICROPYTHON: "build/unix/trezor-emu-core-bitcoinonly"
|
2019-08-22 18:18:44 +00:00
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C core test_emu | ts -s"
|
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
|
|
|
|
2022-01-07 12:07:45 +00:00
|
|
|
core btconly device asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen btconly debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
MICROPYTHON: "build/unix/trezor-emu-core-bitcoinonly"
|
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core monero test:
|
2019-08-19 12:24:32 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- 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:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --arg fullDeps true --run "poetry run make -C core test_emu_monero | ts -s"
|
2020-07-06 17:51:28 +00:00
|
|
|
- mv core/src/.coverage core/.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
|
2021-04-09 10:17:52 +00:00
|
|
|
- core/tests/trezor_monero_tests.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
|
|
|
|
2022-01-10 16:20:42 +00:00
|
|
|
core monero asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
TREZOR_PROFILING: 1
|
|
|
|
script:
|
|
|
|
- nix-shell --arg fullDeps true --run "poetry run make -C core test_emu_monero | ts -s"
|
|
|
|
- mv core/src/.coverage core/.coverage.test_emu_monero
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
- core/tests/trezor_monero_tests.log
|
|
|
|
- core/.coverage.*
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core u2f test:
|
2019-09-14 12:47:30 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- 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:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C tests/fido_tests/u2f-tests-hid | ts -s"
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu_u2f | ts -s"
|
2020-07-06 17:51:28 +00:00
|
|
|
- mv core/src/.coverage core/.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
|
|
|
|
2022-01-07 12:07:45 +00:00
|
|
|
core u2f asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run make -C tests/fido_tests/u2f-tests-hid | ts -s"
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu_u2f | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core fido2 test:
|
2019-10-18 13:35:45 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- 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:
|
2020-07-27 14:59:51 +00:00
|
|
|
- pgrep trezor-emu-core || true
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C core test_emu_fido2 | ts -s"
|
2020-07-27 14:59:51 +00:00
|
|
|
- pgrep trezor-emu-core || true
|
2020-07-06 17:51:28 +00:00
|
|
|
- mv core/src/.coverage core/.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
|
|
|
|
2022-01-07 12:07:45 +00:00
|
|
|
core fido2 asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
script:
|
|
|
|
- pgrep trezor-emu-core || true
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu_fido2 | ts -s"
|
|
|
|
- pgrep trezor-emu-core || true
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core click test:
|
2019-10-25 12:03:44 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
2019-10-25 12:03:44 +00:00
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C core test_emu_click | ts -s"
|
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
|
|
|
|
2022-01-10 16:20:42 +00:00
|
|
|
core click asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu_click | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core upgrade test:
|
2019-09-09 14:03:32 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
2019-09-09 14:03:32 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "core"
|
|
|
|
script:
|
2020-06-07 19:49:06 +00:00
|
|
|
- nix-shell --run "tests/download_emulators.sh"
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run pytest --junitxml=tests/junit.xml tests/upgrade_tests | ts -s"
|
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-09-09 14:03:32 +00:00
|
|
|
|
2022-01-10 16:20:42 +00:00
|
|
|
core upgrade asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "core"
|
|
|
|
script:
|
|
|
|
- nix-shell --run "tests/download_emulators.sh"
|
|
|
|
- nix-shell --run "poetry run pytest --junitxml=tests/junit.xml tests/upgrade_tests | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
core persistence test:
|
2019-10-25 12:03:44 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
2019-10-25 12:03:44 +00:00
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run pytest --junitxml=tests/junit.xml tests/persistence_tests | ts -s"
|
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-25 12:03:44 +00:00
|
|
|
|
2022-01-10 16:20:42 +00:00
|
|
|
core persistence asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run pytest --junitxml=tests/junit.xml tests/persistence_tests | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2022-01-20 15:05:06 +00:00
|
|
|
core hwi test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
|
|
|
script:
|
|
|
|
- nix-shell --run "git clone https://github.com/bitcoin-core/HWI.git"
|
|
|
|
- nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_t ../core/build/unix/trezor-emu-core bitcoind"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- HWI/trezor-t-emulator.stdout
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
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:
|
2020-09-25 13:50:53 +00:00
|
|
|
- .gitlab-ci.yml
|
2019-09-05 15:44:55 +00:00
|
|
|
- ci/**/*
|
|
|
|
- crypto/**/*
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- crypto build
|
2022-01-12 12:47:53 +00:00
|
|
|
variables:
|
|
|
|
ASAN_OPTIONS: "verify_asan_link_order=0"
|
2022-02-15 14:46:21 +00:00
|
|
|
CK_TIMEOUT_MULTIPLIER: 5
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
2020-06-07 19:49:06 +00:00
|
|
|
- ./crypto/tests/aestst
|
|
|
|
- ./crypto/tests/test_check
|
|
|
|
- ./crypto/tests/test_openssl 1000
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "cd crypto && ITERS=10 poetry run pytest --junitxml=tests/junit.xml tests | ts -s"
|
2022-01-12 15:35:34 +00:00
|
|
|
- nix-shell --run "CK_TIMEOUT_MULTIPLIER=20 valgrind -q --error-exitcode=1 ./crypto/tests/test_check_noasan | ts -s"
|
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:
|
2022-01-12 12:47:53 +00:00
|
|
|
- crypto/tests/junit.xml
|
2020-01-02 17:55:37 +00:00
|
|
|
reports:
|
2022-01-12 12:47:53 +00:00
|
|
|
junit: crypto/tests/junit.xml
|
2020-01-02 17:55:37 +00:00
|
|
|
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
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy emu regular debug build
|
2019-08-19 12:24:32 +00:00
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run legacy/script/test | ts -s"
|
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
|
|
|
|
2022-01-07 20:51:05 +00:00
|
|
|
legacy asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- legacy emu regular debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run legacy/script/test | ts -s"
|
|
|
|
|
2020-02-24 11:26:03 +00:00
|
|
|
legacy btconly test:
|
2019-08-22 18:18:44 +00:00
|
|
|
stage: test
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy emu btconly debug build
|
2019-08-22 18:18:44 +00:00
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf"
|
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run legacy/script/test | ts -s"
|
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
|
|
|
|
2022-01-07 20:51:05 +00:00
|
|
|
legacy btconly asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- legacy emu btconly debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf"
|
|
|
|
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
|
|
|
script:
|
|
|
|
- nix-shell --run "poetry run legacy/script/test | ts -s"
|
|
|
|
|
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
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy emu regular debug build
|
2019-09-09 14:03:32 +00:00
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "legacy"
|
|
|
|
script:
|
2020-06-07 19:49:06 +00:00
|
|
|
- nix-shell --run "tests/download_emulators.sh"
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run pytest --junitxml=tests/junit.xml tests/upgrade_tests | ts -s"
|
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-09-09 14:03:32 +00:00
|
|
|
|
2022-01-10 16:20:42 +00:00
|
|
|
legacy upgrade asan test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- legacy emu regular debug asan build
|
|
|
|
only:
|
|
|
|
- schedules # nightly build
|
|
|
|
variables:
|
|
|
|
TREZOR_UPGRADE_TEST: "legacy"
|
|
|
|
script:
|
|
|
|
- nix-shell --run "tests/download_emulators.sh"
|
|
|
|
- nix-shell --run "poetry run pytest --junitxml=tests/junit.xml tests/upgrade_tests | ts -s"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/junit.xml
|
|
|
|
reports:
|
|
|
|
junit: tests/junit.xml
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
|
|
|
|
2022-01-20 15:05:06 +00:00
|
|
|
legacy hwi test:
|
|
|
|
stage: test
|
|
|
|
<<: *gitlab_caching
|
|
|
|
needs:
|
|
|
|
- legacy emu regular debug build
|
|
|
|
variables:
|
|
|
|
EMULATOR: "1"
|
|
|
|
script:
|
|
|
|
- nix-shell --run "git clone https://github.com/bitcoin-core/HWI.git"
|
|
|
|
- nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_1 ../legacy/firmware/trezor.elf bitcoind"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- HWI/trezor-1-emulator.stdout
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
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
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-08-17 18:37:08 +00:00
|
|
|
needs: []
|
2020-07-03 16:02:46 +00:00
|
|
|
variables:
|
|
|
|
LC_ALL: "C.UTF-8"
|
|
|
|
LANG: "C.UTF-8"
|
2019-09-05 15:44:55 +00:00
|
|
|
only:
|
|
|
|
changes:
|
2020-08-08 17:19:15 +00:00
|
|
|
- poetry.lock
|
2020-09-25 13:50:53 +00:00
|
|
|
- .gitlab-ci.yml
|
2019-09-05 15:44:55 +00:00
|
|
|
- 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:
|
2021-03-26 14:42:24 +00:00
|
|
|
# Workaround for nixpkgs+tox integration failure which results in:
|
|
|
|
# ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'
|
|
|
|
# The value of _PYTHON_SYSCONFIGDATA_NAME has changed between python 3.7 and 3.8 and with
|
|
|
|
# multiple versions in your environment the older pythons don't seem to work under tox.
|
|
|
|
# When the variable is unset the interpreter seems to do the right thing. Can be removed in
|
|
|
|
# july 2023 when python 3.7 is EOLed.
|
|
|
|
# See also:
|
|
|
|
# https://github.com/NixOS/nixpkgs/blob/b00c7c2d1d905eb63c81a0917f1a94b763a7843b/pkgs/development/interpreters/python/cpython/default.nix#L103
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/98915
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --arg fullDeps true --run "unset _PYTHON_SYSCONFIGDATA_NAME && cd python && poetry run tox | ts -s"
|
2019-08-19 12:24:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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:
|
2020-09-25 13:50:53 +00:00
|
|
|
- .gitlab-ci.yml
|
2019-09-05 15:44:55 +00:00
|
|
|
- ci/**/*
|
|
|
|
- storage/**/*
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-08-17 18:37:08 +00:00
|
|
|
needs: []
|
2019-08-19 12:24:32 +00:00
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C storage/tests build | ts -s"
|
|
|
|
- nix-shell --run "poetry run make -C storage/tests tests_all | ts -s"
|
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
|
|
|
|
2020-12-04 16:26:55 +00:00
|
|
|
# Memory profiling
|
|
|
|
|
2020-10-26 19:30:55 +00:00
|
|
|
core unix memory profiler:
|
|
|
|
stage: test
|
|
|
|
when: manual
|
2021-11-24 12:24:10 +00:00
|
|
|
<<: *gitlab_caching
|
2020-10-26 19:30:55 +00:00
|
|
|
needs: []
|
|
|
|
variables:
|
|
|
|
PYOPT: "0"
|
|
|
|
TREZOR_MEMPERF: "1"
|
2020-12-07 21:53:17 +00:00
|
|
|
PYTEST_TIMEOUT: "900"
|
2020-10-26 19:30:55 +00:00
|
|
|
script:
|
2021-06-07 10:33:02 +00:00
|
|
|
- nix-shell --run "poetry run make -C core build_unix_frozen | ts -s"
|
|
|
|
- nix-shell --run "poetry run make -C core test_emu | ts -s"
|
2020-10-26 19:30:55 +00:00
|
|
|
- nix-shell --run "mkdir core/prof/memperf-html"
|
|
|
|
- nix-shell --run "poetry run core/tools/alloc.py --alloc-data=core/src/alloc_data.txt html core/prof/memperf-html"
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
|
|
|
paths:
|
|
|
|
- tests/trezor.log
|
|
|
|
- core/prof/memperf-html
|
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|
2021-12-03 16:09:00 +00:00
|
|
|
|
|
|
|
# Connect
|
|
|
|
|
|
|
|
connect test core:
|
|
|
|
image: registry.gitlab.com/satoshilabs/trezor/trezor-user-env/trezor-user-env:latest
|
|
|
|
stage: test
|
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
|
|
|
variables:
|
|
|
|
SDL_VIDEODRIVER: "dummy"
|
|
|
|
before_script:
|
|
|
|
- cp /builds/satoshilabs/trezor/trezor-firmware/core/build/unix/trezor-emu-core /trezor-user-env/src/binaries/firmware/bin/trezor-emu-core-v2.99.99
|
|
|
|
- chmod u+x /trezor-user-env/src/binaries/firmware/bin/trezor-emu-core-v2.99.99
|
|
|
|
- nix-shell -p autoPatchelfHook SDL2 SDL2_image --run "autoPatchelf /trezor-user-env/src/binaries/firmware/bin/trezor-emu-core-v2.99.99"
|
|
|
|
script:
|
|
|
|
- /trezor-user-env/run.sh &
|
|
|
|
- nix-shell --run "tests/connect_tests/connect_tests.sh 2.99.99"
|
|
|
|
after_script:
|
|
|
|
- cp /trezor-user-env/logs/debugging.log trezor-user-env-debugging.log
|
2021-12-15 09:16:17 +00:00
|
|
|
- cp /trezor-user-env/logs/emulator_bridge.log tenv-emulator-bridge-debugging.log
|
2022-01-10 08:54:10 +00:00
|
|
|
allow_failure: true
|
2021-12-03 16:09:00 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- trezor-user-env-debugging.log
|
2021-12-15 09:16:17 +00:00
|
|
|
- tenv-emulator-bridge-debugging.log
|
2021-12-03 16:09:00 +00:00
|
|
|
expire_in: 1 week
|
|
|
|
when: always
|