Enable build-time tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libyang2 (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
The build-time tests are disabled by default, and have to be enabled explicitly.
From the README file:
"""
## Tests
libyang includes several tests built with [cmocka](https:/
can be found in `tests` subdirectory and they are designed for checking library
functionality after code changes. Additional regression tests done with
a corpus of fuzzing inputs that previously caused crashes are done.
Those are available in `tests/fuzz` and are built automatically with the
cmocka unit tests.
The tests are by default built in the `Debug` build mode by running
```
$ make
```
In case of the `Release` mode, the tests are not built by default (it requires
additional dependency), but they can be enabled via cmake option:
```
$ cmake -DENABLE_TESTS=ON ..
```
"""
I suggest the last approach, to keep the build type "Release".
I actually tried that, and hit a bug[1], for which upstream committed a fix[2] to the devel branch.
1. https:/
2. https:/
Related branches
- Utkarsh Gupta (community): Approve
- Canonical Server: Pending requested
-
Diff: 282 lines (+241/-2)5 files modifieddebian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/fix-test-suite-wrt-FILE.patch (+227/-0)
debian/patches/series (+1/-0)
debian/rules (+2/-1)
Changed in libyang2 (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | New → Triaged |
tags: | added: server-todo |
Changed in libyang2 (Ubuntu): | |
status: | Triaged → In Progress |
This bug was fixed in the package libyang2 - 2.0.112-6ubuntu1
---------------
libyang2 (2.0.112-6ubuntu1) jammy; urgency=medium
* Enable build time tests (LP: #1958385): test-suite- wrt-FILE. patch: fix test suite failure due
- d/rules: set -DENABLE_TESTS=ON
- d/p/fix-
to __FILE__ being a relative path
-- Andreas Hasenack <email address hidden> Thu, 20 Jan 2022 21:03:40 +0000