Unit Tests, Documentation and Mocks (oh my!)

Andrew Jeffery andrew at aj.id.au
Thu Aug 8 10:10:35 AEST 2019


Hi Wilfred,

On Thu, 8 Aug 2019, at 05:16, Wilfred Smith wrote:
> Please pardon my ignorance, but I’ve searched and come up empty-handed. 
> A URL would be greatly appreciated.
> 
> Where are the unit tests,

Unit tests sit in the application repositories alongside the code. OpenBMC
has historically been poor on unit testing, though this is improving.

We do also have an integration test suite:

https://github.com/openbmc/openbmc-test-automation

> the interface documentation (particularly for 
> the driver and D-Bus components)

DBus code is auto-generated by sdbusplus[1] from interface descriptions in
e.g. [2]. The intent is that the interface definition and its documentation live
together there.

[1] https://github.com/openbmc/sdbusplus
[2] https://github.com/openbmc/phosphor-dbus-interfaces

> and the mock classes for verifying 
> that stuff works as expected?
> 
> Also, should I presume that this code base is not intended to support 
> multi-core BMC’s (e.g. Pilot4).

Where is this question coming from? Multi-core support is largely a matter
for u-boot and the early stages of the kernel, nothing above those two
components cares how many cores we have (save for resource exhaustion).

> 
> I’m sure Ed or Andrew will respond with “You doofus, it’s all at  
> unit-test.openbmc.org and we have a dashboard for our code quality 
> metrics on blitherspot.com” in 3…2…1…

It would be ideal if we had some dashboards, but we don't currently (at
least as far as I'm aware). It would be great if someone could work on it :)

Hope that helps,

Andrew


More information about the openbmc mailing list