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

Conversation

d3zd3z
Copy link
Member

@d3zd3z d3zd3z commented Apr 11, 2024

The ptest command runs multiple tests, based on the sim.yaml file that CI uses. Enhance this command to support listing the tests that would be run, and selecting a subset of those tests.

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>
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>
The `list` command will show what tests are available.

Signed-off-by: David Brown <david.brown@linaro.org>
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>
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>
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>
Signed-off-by: David Brown <david.brown@linaro.org>
@d3zd3z
Copy link
Member Author

d3zd3z commented Apr 17, 2024

@davidvincze Any chance on a review here?

@davidvincze
Copy link
Collaborator

Thank you for this patch David, no comments from my side.

@d3zd3z d3zd3z merged commit d2e69bf into mcu-tools:main Apr 19, 2024
55 checks passed
@d3zd3z d3zd3z deleted the ptest-help branch April 19, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants