Run unit-test during development

Deng Tyler tyler.sabdon at
Fri Dec 17 13:36:08 AEDT 2021

Hi Patrick:
    I try to build and run unit test repository which support meson such as
phosphor-logging and phosphor-network. There is dependency issue while
building them and I wonder it is a bug or my environment issue.
/openbmc/phosphor-logging$ meson builddir && ninja -C builddir test
The Meson build system
Version: 0.59.2
Source dir:  /openbmc/phosphor-logging
Build dir:  /openbmc/phosphor-logging/builddir
Build type: native build
Project name: phosphor-logging
Project version: 1.0.0
C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu
7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the host machine: c++ ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/usr/bin/python3)
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency systemd found: YES 237
Found CMake: /usr/bin/cmake (3.10.2)
Run-time dependency sdbusplus found: NO (tried pkgconfig and cmake)
Cloning into 'sdbusplus'...
remote: Enumerating objects: 3559, done.
remote: Counting objects: 100% (609/609), done.
remote: Compressing objects: 100% (384/384), done.
remote: Total 3559 (delta 346), reused 403 (delta 162), pack-reused 2950
Receiving objects: 100% (3559/3559), 891.70 KiB | 7.37 MiB/s, done.
Resolving deltas: 100% (2289/2289), done.

Executing subproject sdbusplus

sdbusplus| Project name: sdbusplus
sdbusplus| Project version: 1.0.0
sdbusplus| C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu
7.5.0-3ubuntu1~18.04) 7.5.0")
sdbusplus| C linker for the host machine: cc ld.bfd 2.30
sdbusplus| C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu
7.5.0-3ubuntu1~18.04) 7.5.0")
sdbusplus| C++ linker for the host machine: c++ ld.bfd 2.30
sdbusplus| Run-time dependency libsystemd found: NO (tried pkgconfig and

subprojects/sdbusplus/ ERROR: Dependency "libsystemd" not
found, tried pkgconfig and cmake

A full log can be found at

Patrick Williams <patrick at> 於 2021年12月17日 週五 上午1:12寫道:

> On Thu, Dec 16, 2021 at 01:53:41PM +0800, Deng Tyler wrote:
> > Hi Patrick:
> >     Thank for your kind reply and that's really helpful. I am trying to
> > figure out the meson subprojects system but still encounter lot of
> barrier.
> > I run unt test using command "meson buiildir && ninja -C builddir test"
> in
> > my development environment but never work. Could you help to cite an
> > example in current openbmc repository? Do openbmc contributor run unit
> test
> > by meson subprojects or when they are developing?
> I can't really comment on what other people do, but I can tell you what I
> do.
> 1. If the repository supports Meson, I always attempt to build / test using
>    standalone support (ie. meson subprojects).
> 2. If 'meson subprojects' doesn't seem to work, I fix it to make it work.
> 3. If the repository is anything else and it isn't too much effort, I try
> to
>    port it to meson.
> 4. When all else fails I use ''.  I often execute
> it with
>    an alias I have: `NO_FORMAT_CODE=1 lf-ut`[1].
> ---
> Do you have examples of meson+ninja failing?  I'm fairly certain it works
> fine
> for almost every repository I'm listed as a maintainer on.  I've also used
> it
> (or fixed it) fairly recently for: bmcweb, phosphor-logging, and
> phosphor-certificate-manager.
> Maybe you can point to what failure you're seeing in that case as well (you
> can upload a log to )?
> 1.
> --
> Patrick Williams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openbmc mailing list