Bug 12724 - Support "make check" on build host via qemu wrappers
Summary: Support "make check" on build host via qemu wrappers
Status: RESOLVED DUPLICATE of bug 13063
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-05-01 14:10 UTC by Juro Bystricky
Modified: 2018-12-12 12:04 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2018-05-01 14:10:49 UTC
There is a mechanism to test cross-compiled binaries via ptest infrastructure.
The tests are cross-compiled on build host and assumed to run later on in an image as native binaries via ptest-runner.
It should be also possible to cross-compile the test binaries and run them on the build host as well via qemu wrappers. It is probably not going to be easy, but this way we could (for example) assure a package will not make it into sstate (or package feed) unless it passes some tests. Basically, build would fail if it fails to pass "make check", which would be performed automatically. This would, however, require some additional syntax and updating compliant recipes.

I believe qemu wrappers are mature enough to accomplish this.
Comment 1 Juro Bystricky 2018-05-03 06:27:26 UTC
This would be *** much *** easier to implement if we assumed/mandated binfmt. 
(for example https://wiki.debian.org/QemuUserEmulation). Besides, there is no point in re-inventing the wheel. In principle, a cross-compiled program should "just run" on the build host.
Comment 2 Ross Burton 2018-05-03 07:56:13 UTC
Having lived through scratchbox and scratchbox2, having binfmt/qemu 'just work' is great for the trivial cases but causes a world of pain for the non-trivial ones.

We do have a way to run binaries in qemu-user already (qemu.bbclass) so running a test suite at build time should be possible.
Comment 3 Ross Burton 2018-12-12 12:04:25 UTC
Marking as dup.

*** This bug has been marked as a duplicate of bug 13063 ***