Public bug reported:

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://cmocka.org/). The 
tests
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://github.com/CESNET/libyang/issues/1773
2. 
https://github.com/CESNET/libyang/commit/de2e8b272b8238258f36c42386f3f2c9806026fd

** Affects: libyang2 (Ubuntu)
     Importance: Undecided
     Assignee: Andreas Hasenack (ahasenack)
         Status: Triaged

** Changed in: libyang2 (Ubuntu)
     Assignee: (unassigned) => Andreas Hasenack (ahasenack)

** Changed in: libyang2 (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1958385

Title:
  Enable build-time tests

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libyang2/+bug/1958385/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to