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

imgtool: Add tests for imgtool commands part 1 #1983

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Commits on Oct 31, 2024

  1. imgtool: Add pre-generated images and keys

    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I52646f5f27d47e3639368c6adcaa9df62b1b7853
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    e1e4d5b View commit details
    Browse the repository at this point in the history
  2. imgtool: Add missing copyright notice to test_keys.py

    Add missing copyright notice to clarify authorship of the original
    contribution. Having the notice present will make contributions to the
    file from other parties easier. The date of the original contribution
    is derived from the git history.
    
    Change-Id: I9c97f064ee8c308333058113430176b87b81b397
    Signed-off-by: David Vincze <[email protected]>
    Signed-off-by: Rustam Ismayilov <[email protected]>
    davidvincze authored and rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    8963b5a View commit details
    Browse the repository at this point in the history
  3. imgtool: Add new tests for key operations

    Refactor test_keys.py
    Move constants to separate file
    Verify key type in all testcases
    Add tests for generating keys with password
    Add more testcases for getpriv command
    Add more testcases for getpub command
    Add more testcases for getpubhash command
    Update list of expected to fail tests
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: If48a1c1496aced2e6f69f317f200aafc08d55538
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    b95b3b5 View commit details
    Browse the repository at this point in the history
  4. imgtool: Improve key type checks and invalid pass-phrase handling

    Key type checking moved to separate function and added support for
    ed25519, enckey is enforced to be a public key
    
    Invalid pass-phrase was not reachable in methods as in that case an
    exception raised instead of returning "None".
    load_key function improved by adding handling for invalid pass-phrase
    and FileNotFound exception.
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I0caa0a6100fc95c8339403e991d6de0337c7a725
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    4824e36 View commit details
    Browse the repository at this point in the history
  5. imgtool: Add tests for signing

    Add tests for various features of sign command
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I46005bbbfa3b707076f5f69e49b7e2028e13af16
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    f676afa View commit details
    Browse the repository at this point in the history
  6. imgtool: Add testing for verify command

    Tests for verify command with various types of signed
    image files
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I309aa42a77812cae41007c70b99f28e2597840cf
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    46c94c3 View commit details
    Browse the repository at this point in the history
  7. imgtool: Add tests for dumpinfo command

    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I380e2839ae14ceca706e5b03f5ecf2d4ed53af5c
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    401e6e8 View commit details
    Browse the repository at this point in the history
  8. imgtool: Add verification tests for hex files

    Added tests for verification of hex files
    Extract common assertions to a separate function
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: Ia20fcbec81c0fea22f7cfe4af7a8927a6dbbbc74
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    3af9d9b View commit details
    Browse the repository at this point in the history
  9. imgtool: Add support for hex files in dumpinfo and tests

    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I37b54000955f30f87aff8f23a1ea71804bf967cd
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    44e14a3 View commit details
    Browse the repository at this point in the history
  10. imgtool: Unify File not found error messages

    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I67e614811c31e786efebc05b9264611d6bb17edb
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    e765e0e View commit details
    Browse the repository at this point in the history
  11. imgtool: Fix test paths

    Move tests from imgtool/keys to test/keys
    Move pre-generated files to test/assets folder
    Fix paths for tests to run from root directory
    Replace hardcoded paths with constants in tests
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I100e65609f31cefa1c17f20143bceb165862fa14
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    31dfd12 View commit details
    Browse the repository at this point in the history
  12. imgtool: Install imgtool dependencies in fih-test

    Install imgtool dependencies before tf-m build in fih-test to fix
    failing ci job due to ImportError, originating from missing new types
    added in cryptography library version 40.0.0.
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: Id05f251024cf126d90d0fea22d21167329530f87
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    9d79458 View commit details
    Browse the repository at this point in the history
  13. imgtool: Install imgtool dependencies in zephyr-build

    Install imgtool dependencies before twister tests in zephyr-build to fix
    failing ci job due to ImportError, originating from missing new types
    added in cryptography library version 40.0.0.
    
    Signed-off-by: Rustam Ismayilov <[email protected]>
    Change-Id: I1e4ca88a4a0329a198290f6e1917c139c30abc4f
    rustammendel committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    65676cd View commit details
    Browse the repository at this point in the history