ci: run the bootloader emulator tests [no changelog]
What changed, and why it matters
This commit adds a new automated test job to the project's continuous integration (CI) pipeline. It builds and runs bootloader emulator tests for several Trezor hardware wallet models and updates helper scripts so the new test job is included in pull-request reports and fixture updates. There is no change to the firmware code that runs on user devices, no fix for a vulnerability, and no security-relevant behavior change.
No security action required. This is a routine CI enhancement. Reviewers may verify the new job uses intended development/test keys and does not leak secrets or production artifacts.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is purely CI/infrastructure: .github/workflows/core.yml adds a core_bootloader_test GitHub Actions job that builds the bootloader emulator with development keys and debuglink enabled, then runs test_emu_bootloader_ui. ci/make_pull_comment.py and tests/github.py are updated to include bootloader_test in the list of test types/jobs and mark it as English-only. No product code, cryptographic logic, or vulnerability remediation is present.
Changed components
.github/workflows/core.ymlci/make_pull_comment.pytests/github.pyInspect captured patch +54 / −4
### .github/workflows/core.yml
@@ -501,6 +501,50 @@ jobs:
continue-on-error: true
- uses: $/.github/actions/upload-coverage
+ # Bootloader emulator tests - UI.
+ # See [docs/tests/bootloader-tests](../tests/bootloader-tests.md) for more info.
+ core_bootloader_test:
+ name: Bootloader tests (${{ matrix.model }})
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ model: [T2T1, T3B1, T3T1, T3W1]
+ env:
+ TREZOR_MODEL: ${{ matrix.model }}
+ # the test images are signed with the development keys
+ BOOTLOADER_DEVEL: 1
+ # debuglink and no animations
+ PYOPT: 0
+ PYTEST_TIMEOUT: 400
+ TESTOPTS: "--durations 10"
+ permissions:
+ id-token: write # for fetching the OIDC token for AWS
+ contents: read # for actions/checkout
+ steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6.0.2
+ with:
+ submodules: recursive
+ - uses: $/.github/actions/environment
+ - run: $UV_RUN make -C core build_bootloader_emu
+ - run: $UV_RUN make -C core test_emu_bootloader_ui
+ - run: tail -v -n50 tests/trezor*.log || true
+ if: failure()
+ - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
+ with:
+ name: core-test-bootloader-${{ matrix.model }}
+ path: tests/trezor*.log
+ retention-days: 7
+ if: always()
+ - uses: $/.github/actions/ui-report
+ with:
+ model: ${{ matrix.model }}
+ lang: en
+ status: ${{ job.status }}
+ if: always()
+ continue-on-error: true
+
# Upgrade tests.
# See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
core_upgrade_test:
### ci/make_pull_comment.py
@@ -6,7 +6,9 @@
REPORT_URL = f"https://data.trezor.io/dev/firmware/ui_report/{RUN_ID}"
CI_RUN_URL = f"https://github.com/trezor/trezor-firmware/actions/runs/{RUN_ID}"
-TEST_TYPES = ["device_test", "click_test", "persistence_test"]
+TEST_TYPES = ["device_test", "click_test", "persistence_test", "bootloader_test"]
+# jobs that run in English only
+EN_ONLY_TYPES = ["persistence_test", "bootloader_test"]
MODELS = [
"T2T1",
"T3B1",
@@ -33,8 +35,7 @@ def print_table(lang):
screens = f"[all]({REPORT_URL}/{lang}_diff.html)"
print(f"\n# `{lang}` {main}({screens})\n")
- # Currently, persistence_test is not running with translations
- test_types = TEST_TYPES if lang == "en" else TEST_TYPES[:-1]
+ test_types = [t for t in TEST_TYPES if lang == "en" or t not in EN_ONLY_TYPES]
header = ["model"] + test_types
print("|".join(header))
### tests/github.py
@@ -40,7 +40,12 @@
MODELS = [model.internal_name for model in models.ALL_MODELS]
CORE_LANGUAGES = ["en", "cs", "de", "es", "fr", "id", "pt"]
-CORE_JOBS = ["core_device_test", "core_click_test", "core_persistence_test"]
+CORE_JOBS = [
+ "core_device_test",
+ "core_click_test",
+ "core_persistence_test",
+ "core_bootloader_test",
+]
LEGACY_LANGUAGES = ["en"]
LEGACY_JOBS = ["legacy_device_test"]
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.