Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(prodtest): refactor and improve prodtest #4534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cepetr
Copy link
Contributor

@cepetr cepetr commented Jan 24, 2025

This PR Improves the Prodtest Firmware:

The previously messy prodtest source code has been completely refactored to
facilitate further development and make it suitable for handing over to third parties.

  1. Code Refactoring

    • The prodtest code has been reorganized and split into separate files based on command categories.
    • Test/command implementations can now be moved to the drivers folder (this has not been done yet).
  2. Protocol specification enhancements

    • The protocol specification has been refined and now includes the following new elements:
      • Debug/information tracing added (lines starting with # ...).
      • PROGRESS messages for commands that output multi-line information.
      • ERROR messages now include a mandatory error code and an optional error description.
  3. Command updates

    • All commands are now written in lowercase and do not contain spaces (spaces are used solely for argument separation).
    • Commands use dashes as word separators to clearly distinguish between commands and arguments.
    • All commands now return a final response: either OK or ERROR.
    • All commands return an error when used with unexpected trailing input
  4. CLI interface module

    • Features added to support manual control:
      • Simple line editing, autocomplete (using TAB), command history
      • Text coloring for enhanced readability.
  5. Documentation Updates:

    • The prodtest documentation has been updated and improved to reflect the changes.

@cepetr cepetr self-assigned this Jan 24, 2025
Copy link

github-actions bot commented Jan 24, 2025

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@TychoVrahe TychoVrahe linked an issue Jan 24, 2025 that may be closed by this pull request
@cepetr cepetr force-pushed the cepetr/new-prodtest branch from e5726e1 to c3cdf4e Compare January 26, 2025 12:35
@cepetr cepetr requested a review from TychoVrahe January 26, 2025 12:39
@cepetr cepetr marked this pull request as ready for review January 26, 2025 12:40
@cepetr cepetr requested a review from prusnak as a code owner January 26, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

Prodtest redesign
1 participant