Run unit-test during development
Patrick Williams
patrick at stwcx.xyz
Fri Dec 17 04:12:18 AEDT 2021
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 run-unit-test-docker.sh 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 'run-unit-test-docker.sh'. 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 gist.github.com )?
1. https://github.com/williamspatrick/dotfiles/blob/fb542abf99c944051544990f69a6d20c82d2a904/env/30_linux/lfopenbmc.zsh#L76
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20211216/b5e6db98/attachment.sig>
More information about the openbmc
mailing list