ci(core): use `core/Makefile` to run upgrade tests
What changed, and why it matters
This commit changes how Trezor runs its internal firmware upgrade tests in continuous integration. Instead of calling pytest directly, it now calls a Makefile target. The only practical effect is that extra test options (TESTOPTS) are correctly passed through. There is no change to the firmware code users rely on, no fix for a security bug, and no security relevance.
No security action needed. Treat as a normal CI/test infrastructure change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies .github/workflows/core.yml to invoke uv run make -C core test_emu_upgrade instead of uv run pytest tests/upgrade_tests, and adds a corresponding test_emu_upgrade target in core/Makefile that runs pytest with $(TESTOPTS) and $(TEST_LANG). This ensures CI test options are propagated. It does not alter product code, cryptographic logic, or any runtime behavior of the device.
Changed components
CI workflow: .github/workflows/core.ymlBuild/test Makefile: core/MakefileInspect captured patch +4 / −1
diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml
index ed8260f4..62c74e49 100644
--- a/.github/workflows/core.yml
+++ b/.github/workflows/core.yml
@@ -435,7 +435,7 @@ jobs:
with:
full-deps: "true"
- run: nix-shell --arg fullDeps true --run "tests/download_emulators.sh ${{ matrix.model }}"
- - run: nix-shell --arg fullDeps true --run "uv run pytest tests/upgrade_tests"
+ - run: nix-shell --arg fullDeps true --run "uv run make -C core test_emu_upgrade"
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
name: core-test-upgrade-${{ matrix.model }}-${{ matrix.asan }}
diff --git a/core/Makefile b/core/Makefile
index d1d837ca..0076e2bd 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -143,6 +143,9 @@ test_emu_persistence_ui: ## run persistence tests with UI testing
$(PYTEST) $(TESTPATH)/persistence_tests $(TESTOPTS) \
--ui=test --ui-check-missing --do-master-diff --lang=$(TEST_LANG)
+test_emu_upgrade: ## run upgrade tests
+ $(PYTEST) $(TESTPATH)/upgrade_tests $(TESTOPTS) --lang=$(TEST_LANG)
+
test_emu_ui: ## run ui integration tests
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS) \
--ui=test --ui-check-missing --do-master-diff \
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.