<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12724</bug_id>
          
          <creation_ts>2018-05-01 14:10:49 +0000</creation_ts>
          <short_desc>Support &quot;make check&quot; on build host via qemu wrappers</short_desc>
          <delta_ts>2018-12-12 12:04:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>13063</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>stephano</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80461</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2018-05-01 14:10:49 +0000</bug_when>
    <thetext>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 &quot;make check&quot;, 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80471</commentid>
    <comment_count>1</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2018-05-03 06:27:26 +0000</bug_when>
    <thetext>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 &quot;just run&quot; on the build host.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80478</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-05-03 07:56:13 +0000</bug_when>
    <thetext>Having lived through scratchbox and scratchbox2, having binfmt/qemu &apos;just work&apos; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82477</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-12-12 12:04:25 +0000</bug_when>
    <thetext>Marking as dup.

*** This bug has been marked as a duplicate of bug 13063 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>