Verified Commit 8e537451 authored by Thomas Haller's avatar Thomas Haller
Browse files

CONTRIBUTING: add section about unit tests

parent eee4332e
Pipeline #317395 passed with stages
in 51 minutes and 27 seconds
......@@ -78,6 +78,22 @@ some details of the style we use:
- BAD: `static const unsigned myConstant = 42;`
Unit Tests
----------
We have plenty of unit tests. Run them with `make check` or
`meson -C "$BUILD_DIR" test`.
Note that some files in the source tree are both generated and commited
to git. That means, certain changes to the code also affect these generated
files. The unit test fail in that case, to indicate that the generated
files no longer match what is commited to git.
You can also automatically regenerate the files by running `NM_TEST_REGENERATE=1 make check`.
Note that test-client requires working translation.
See the [comment](https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/eee4332e8facfa5ff5940fa1655575d76ca143ea/src/tests/client/test-client.py#L19)
for how to configure it.
Assertions in NetworkManager code
---------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment