On Wed, 2023-12-13 at 11:10 +0000, Ross Burton wrote:
> 
> 
> > On 7 Dec 2023, at 20:52, Adrian Freihofer via
> > lists.openembedded.org
> > <[email protected]> wrote:
> > 
> > +do_run_tests () {
> > +    meson test -C "${B}" --no-rebuild
> > +}
> 
> Somewhere in <gestures at 100+ feature branches on poky-contrib> is a
> partial implementation of a generic “run the test suite at build time
> in qemu-user” which failed miserably because qemu-user is pretty
> limited.  I suspect it was _too_ generic, by trying to run the tests
> via ‘qemu-user make check’.

Maybe you mean this one which is older:
https://lists.openembedded.org/g/openembedded-core/topic/89289917

And here is a more recent discussion related to my patches:
https://lists.openembedded.org/g/openembedded-core/topic/102708283#190925

> 
> Have you had success with non-trivial test suites managed by
> cmake/meson where the tooling invokes qemu directly? Generalising
> this would be very interesting.
> 
I probably haven't run some non-trivial test suites yet. But the simple
examples I tried worked very well. Running the tests is also
transparently supported by IDEs with support for cmake and meson
(because cmake and meson integrate qemu). Debugging doesn't work yet,
but as far as I know qemu-usermode would also provide a gdbstub, which
would at least theoretically allow seamless debugger integration.
Especially for the SDK use case with IDE integration I see some
potential in this approach. It allows to develop some unit tests on the
host and finally test and deploy the application and the test binaries
on the remote target device. At least in theory, this could hide the
additional complexity of Cross as much as possible.

However, since there are some corner cases where it does not work, it
is fully optionally integrated. cmake recipes that are known to benefit
from qemu-usermode and work reliably with it can inherit cmake-qemu
instead of cmake. Also the new oe-selftests can be seen as tests for
qemu-usermode, which is a dependency of the kernel anyway and should
therefore be tested somehow.

My intention is to introduce this feature in a very limited scope, at
least in this first step.

Adrian



> Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192311): 
https://lists.openembedded.org/g/openembedded-core/message/192311
Mute This Topic: https://lists.openembedded.org/mt/103042533/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to