mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 16:00:07 +01:00
CONTRIBUTING: add section about unit tests
This commit is contained in:
parent
eee4332e8f
commit
8e5374512e
1 changed files with 16 additions and 0 deletions
|
|
@ -78,6 +78,22 @@ some details of the style we use:
|
||||||
- BAD: `static const unsigned myConstant = 42;`
|
- 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
|
Assertions in NetworkManager code
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue