From: Patrick Williams <patrick@stwcx.xyz>
To: Deng Tyler <tyler.sabdon@gmail.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Run unit-test during development
Date: Mon, 13 Dec 2021 10:00:49 -0600 [thread overview]
Message-ID: <YbduMfjuc7TXT6Rw@heinlein> (raw)
In-Reply-To: <CAO9PYRKmup17BSTLNLdBMO=-HjQ2Lxw+Gcw7+0VY8DKVMed9GA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2254 bytes --]
On Mon, Dec 13, 2021 at 04:46:13PM +0800, Deng Tyler wrote:
> Hi All:
> Is there any easier way to run unit-test during development instead of
> running run-unit-test-docker.sh?
If the repository is built using autotools or CMake there probably aren't a lot
of other options. Yocto has something called 'ptest' which would, in theory,
allow the package to build test-cases and deploy them onto the hardware to run
the unit tests. We don't have many repositories configured to support ptest
though.
Any repository that is building using Meson should be able to run the unit tests
on a typical Linux development box. Some of them have not fully implemented
this though. What you want to look for is if the repository has a 'meson.build'
and 'subprojects' subdirectory that contains a number of 'foo.wrap' files. If
it has this, you can probably build the repository outside of
`run-unit-test-docker.sh` or a Yocto OE-SDK environment.
In that case, simply `meson builddir && ninja -C builddir test`.
If you come across a repository that supports Meson (meson.build file) but
doesn't have correct wrap files, those can be added fairly easily. I suspect
you could use these repositories as a reference:
```
$ ls */subprojects/phosphor-logging.wrap
dbus-sensors/subprojects/phosphor-logging.wrap
google-misc/subprojects/phosphor-logging.wrap
openpower-debug-collector/subprojects/phosphor-logging.wrap
openpower-occ-control/subprojects/phosphor-logging.wrap
openpower-vpd-parser/subprojects/phosphor-logging.wrap
phosphor-bmc-code-mgmt/subprojects/phosphor-logging.wrap
phosphor-certificate-manager/subprojects/phosphor-logging.wrap
phosphor-debug-collector/subprojects/phosphor-logging.wrap
phosphor-health-monitor/subprojects/phosphor-logging.wrap
phosphor-led-manager/subprojects/phosphor-logging.wrap
phosphor-networkd/subprojects/phosphor-logging.wrap
phosphor-objmgr/subprojects/phosphor-logging.wrap
phosphor-sel-logger/subprojects/phosphor-logging.wrap
phosphor-virtual-sensor/subprojects/phosphor-logging.wrap
phosphor-watchdog/subprojects/phosphor-logging.wrap
service-config-manager/subprojects/phosphor-logging.wrap
telemetry/subprojects/phosphor-logging.wrap
```
--
Patrick Williams
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-12-13 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 8:46 Run unit-test during development Deng Tyler
2021-12-13 16:00 ` Patrick Williams [this message]
2021-12-16 5:53 ` Deng Tyler
2021-12-16 17:12 ` Patrick Williams
2021-12-17 2:36 ` Deng Tyler
2021-12-17 2:39 ` Andrew Jeffery
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YbduMfjuc7TXT6Rw@heinlein \
--to=patrick@stwcx.xyz \
--cc=openbmc@lists.ozlabs.org \
--cc=tyler.sabdon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.