With this change it is possible to execute changeset_testlist.py
in a directory which does not match the toplevel of the repository.
The toplevel is automatically detected by calling:
git rev-parse --show-toplevel
... for both source and target.
Providing source and target as commit ID does not work when using
two arguments (e.g. "target... source"). Hence, use one argument
(e.g. "target...source") instead.
This allows forcing tests into the test list from the outside, via
command line arguments. Tests passed in via --add-test will always be
part of the test list, regardless of the actual changeset.
This adds a new argument to changeset_testlist.py:
python3 changeset_testlist.py --remove-test "^hw" fpga.usrp3.e320
...would remove all tests that start with "hw", and fpga.usrp3.e320.
If a changeset includes only comments in a C++ or Python file, then the
corresponding tests are not triggered. This is achieved by a new rule
`include_content`, which checks the changeset for code and/or content
changes.
The values of the include_content argument have the following meaning:
- 'code': at least one line with code changed
- 'code-only': all changed lines must be code changes
- 'comments': at least one line with comments changed
- 'comments-only': all changed lines must be comment changes
- 'code-and-comments': either code or comments changes (always True)
Co-authored-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
This tool compares two git branches of UHD and produces a list of tests
required to verify the changeset. The intended use case is to be able to
verify branches that are being created for pull requests.
For example, say a pull requests is based on a branch that only modifies
files in host/lib/usrp/x300. Then it is only necessary to run hardware
tests on X300, running tests on other USRPs would be a waste of time.
This commit contains two files: The utility itself (a Python script),
and a rule file (a YAML file). The former uses the latter to map
a changeset to a list of tests.