Commit Graph

12 Commits

Author SHA1 Message Date
David Brown 0ceb85ad58 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>
2024-04-19 11:50:52 -06:00
David Brown 67fc1fc181 ptest: Add `list` command
The `list` command will show what tests are available.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-04-19 11:50:52 -06:00
David Brown c32ad20fae 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>
2024-04-19 11:50:52 -06:00
David Brown 8798337940 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>
2024-04-19 11:50:52 -06:00
David Brown 2221143936 ptest: Update dependencies
Update some of the dependencies to newer versions, and run `cargo
update`.  This will resolve some potential security warnings about
issues found in older versions of dependencies.  I don't believe any of
these affect this code.

Signed-off-by: David Brown <david.brown@linaro.org>
2022-06-28 17:35:01 -06:00
David Brown 91de33d9f7 ptest: Some simple cleanups from clippy
Run the clippy Rust linter, and apply the simple cleanups it suggests.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-11 07:25:43 -07:00
David Brown ddd390a8e2 ptest: Allow all test runs to be logged
Check the environment variable `PTEST_LOG_ALL`, and if it is set, write
the output of all test runs to a log file instead of just the failures.
Failed test are still written to failure-nnnn.log, but successful runs
are written to success-nnnn.log.  If the environment variable is not
set, ptest behaves as before, only writing to log files when there is a
failure.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-01-14 13:19:58 -07:00
David Brown 48a4ec3e84 ptest: Use github workflow instead of travis
Now that the travis description is empty, ptest no longer runs any
tests.  Change it to use the github workflow description.  It is still
fairly specific to our particular workflow, and will need to be updated
if the form of what is there changes.

The workflow description is quite a bit simpler, so a bunch of code has
been removed.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-01-06 07:59:21 -07:00
David Brown ae8f8db711 ptest: Update dependencies
The yaml-rust package version in the lock file does not work with recent
versions of Rust.  This is fixed in newer version.  Update the lock file
to represent the latest acceptable versions of all of the dependencies.
This change fixes the error at least up to Rust 1.49.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-01-06 07:59:21 -07:00
David Brown 1e1be9b368 Update Cargo.lock files
Recent versions of the Rust compile tool `cargo` insert a comment at the
top of `Cargo.lock` indicating that this file is auto-generated.  Commit
versions of these files with this comment in, so that users of recent
versions of Rust will not have sprious diffs everytime they compile.

Older versions of Rust will remove these lines.  However, this is less
likely to be an issue, as we now depend on at least Rust 1.31 in order
to have Rust 2018 support.  We recommend using 'rustup' to keep the Rust
install up to date.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-07-25 16:24:20 -05:00
David Brown b899f79a28 ptest: Support new format of .travis.yml
The change "Add Mynewt target builds to CI" changes the format of the
.travis.yml file a bit.  Fix up the ptest utility so that it is still
able to run the simulator tests.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-03-15 07:51:47 -03:00
David Brown 2bc2685b2a ptest: Start of utility to run tests in parallel
The travis config allows multiple tests to run in parallel.  Run a small
program that does the same thing.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-01-18 14:01:04 -07:00