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

Add some options to ptest to allow limit sets of tests to be run. #1941

Merged
merged 7 commits into from
Apr 19, 2024

Commits on Apr 11, 2024

  1. ptest: Add command line parsing

    Add a skeleton of a command line parser to the ptest utility.  This will allow
    future changes to add additional options, such as listing and filtering the
    tests that are used.
    
    This adds a single subcommand `run`, which mimics the previous ptest behavior.
    
    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    84e2973 View commit details
    Browse the repository at this point in the history
  2. ptest: Add workflow argument

    Allow the `--workflow` argument to override the workflow file that is used, with
    a reasonable default of the workflow used by CI.
    
    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    c296e3d View commit details
    Browse the repository at this point in the history
  3. ptest: Add list command

    The `list` command will show what tests are available.
    
    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    c864ddf View commit details
    Browse the repository at this point in the history
  4. ptest: Add --test argument

    The `--test` (`-t`) argument allows the caller to limit the tests that are
    invoked by ptest. The argument can be specified multiple times to run several
    tests. The numbers are based on the output of `--list`.
    
    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    31c2437 View commit details
    Browse the repository at this point in the history
  5. ptest: Use 1-based indices for tests

    Adjust the printed numbers, as well as the values to `--test` so that the tests
    are numbered starting from 1 instead of zero.
    
    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8eeb2d2 View commit details
    Browse the repository at this point in the history
  6. sim: Allow slow tests to be skipped

    The normal simulation test takes several hours to run on most machines. Allow a
    few very slow tests to be skipped by setting the environment variable
    `MCUBOOT_SKIP_SLOW_TESTS` to some value. For obvious reasons, this shouldn't be
    done if these power failure simulation tests are needed.
    
    With this change, on my desktop Linux machine, the test time with the skipping
    goes from about 2 hours, to around 5 minutes.
    
    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    89f90cd View commit details
    Browse the repository at this point in the history
  7. docs: Release notes for ptest updates

    Signed-off-by: David Brown <david.brown@linaro.org>
    d3zd3z committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8054495 View commit details
    Browse the repository at this point in the history