1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 03:48:09 +00:00
trezor-firmware/ci/test-hw.yml

160 lines
4.3 KiB
YAML
Raw Normal View History

image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/trezor-firmware-env.nix
2021-11-24 12:24:10 +00:00
# Caching
.gitlab_caching: &gitlab_caching
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .venv/
# Hardware
# [Device tests](../tests/device-tests.md) that run against an actual physical Trezor T.
# The device needs to have special bootloader, found in `core/embed/bootloader_ci`, that
# makes it possible to flash firmware without confirmation on the touchscreen.
#
# All hardware tests are run nightly on the `master` branch, as well as on push to branches
# with whitelisted prefix. If you want hardware tests ran on your branch, make sure its
# name starts with `hw/`.
#
2021-02-05 16:36:25 +00:00
# Currently it's not possible to run all regular TT tests without getting into
# a state where the micropython heap is too fragmented and allocations fail
# (often manifesting as a stuck test case). For that reason some tests are
# skipped.
2021-02-05 16:36:25 +00:00
# See also: https://github.com/trezor/trezor-firmware/issues/1371
hardware core regular device test:
stage: test
only:
- schedules # nightly build
- /^legacy\//
- /^release\//
- /^secfix\//
- /^hw\//
tags:
- tpmb
needs:
- core fw regular debug build
variables:
PYTEST_TIMEOUT: "1200"
script:
- cd ci/hardware_tests
- set -a
- source hardware.cfg
- set +a
- $NIX_SHELL --run "cd ../.. && poetry install"
- $NIX_SHELL --run "poetry run python bootstrap.py tt ../../firmware-T2*.bin | ts -s"
- $NIX_SHELL --run "poetry run pytest ../../tests/device_tests | ts -s"
timeout: 6h
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
expire_in: 2 days
when: always
# Also device tests on physical Trezor T but with Bitcoin-only firmware.
hardware core btconly device test:
stage: test
only:
- schedules # nightly build
- /^legacy\//
- /^release\//
- /^secfix\//
- /^hw\//
tags:
- tpmb
needs:
- core fw btconly debug build
variables:
TREZOR_PYTEST_SKIP_ALTCOINS: 1
PYTEST_TIMEOUT: "1200"
script:
- cd ci/hardware_tests
- set -a
- source hardware.cfg
- set +a
- $NIX_SHELL --run "cd ../.. && poetry install"
- $NIX_SHELL --run "poetry run python bootstrap.py tt ../../firmware-T2*.bin | ts -s"
- $NIX_SHELL --run "poetry run pytest ../../tests/device_tests | ts -s"
2021-05-04 14:03:09 +00:00
timeout: 4h
artifacts:
2021-03-25 17:23:01 +00:00
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
expire_in: 2 days
when: always
hardware core monero test:
stage: test
only:
- schedules # nightly build
- /^release\//
- /^secfix\//
- /^hw\//
tags:
- tpmb
needs:
- core fw regular debug build
variables:
2023-05-05 10:32:29 +00:00
TESTOPTS: --trezor-path webusb
2021-03-25 17:23:01 +00:00
script:
- cd ci/hardware_tests
- set -a
- source hardware.cfg
- set +a
- $NIX_SHELL --run "cd ../.. && poetry install"
- $NIX_SHELL --run "poetry run python bootstrap.py tt ../../firmware-T2*.bin | ts -s"
- $NIX_SHELL --arg fullDeps true --run "cd ../../core/tests && ./run_tests_device_emu_monero.sh $TESTOPTS | ts -s"
2021-05-04 14:03:09 +00:00
timeout: 1h
2021-03-25 17:23:01 +00:00
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
expire_in: 2 days
when: always
# [Device tests](../tests/device-tests.md) executed on physical Trezor 1.
# This works thanks to [tpmb](https://github.com/mmahut/tpmb), which is a small arduino
# device capable of pushing an actual buttons on the device.
hardware legacy regular device test:
stage: test
only:
- schedules # nightly build
- /^legacy\//
- /^release\//
- /^secfix\//
- /^hw\//
tags:
- tpmb
needs:
- legacy fw regular debug build
script:
- cd ci/hardware_tests
- $NIX_SHELL --run "./t1_hw_test.sh | ts -s"
timeout: 1h20m
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- ci/hardware_tests/*.mp4
expire_in: 2 days
when: always
# Also device tests on physical Trezor 1 but with Bitcoin-only firmware.
hardware legacy btconly device test:
stage: test
variables:
TREZOR_PYTEST_SKIP_ALTCOINS: 1
only:
- schedules # nightly build
- /^legacy\//
- /^release\//
- /^secfix\//
- /^hw\//
tags:
- tpmb
needs:
- legacy fw btconly debug build
script:
- cd ci/hardware_tests
- $NIX_SHELL --run "./t1_hw_test.sh | ts -s"
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- ci/hardware_tests/*.mp4
expire_in: 2 days
when: always