<?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>14303</bug_id>
          
          <creation_ts>2021-03-16 15:58:11 +0000</creation_ts>
          <short_desc>Result of build is not stored in testresult.json with resulttool</short_desc>
          <delta_ts>2026-10-29 15:21:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Tooling</product>
          <component>tooling</component>
          <version>5.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>jay.shen.teoh</cc>
    
    <cc>mhalstead</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>tgamblin</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89630</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-03-16 15:58:11 +0000</bug_when>
    <thetext>Whilst the outcome of tests like testimage, testsdk or oe-selftest are stored in testresult.json, there is no storage of &quot;build&quot; results like core-image-sato being built for qemuarm.

We&apos;d like to use testresults.json as the way to document testing for Yocto Project Compatible status of a layer. To do that we need to document the build tests completed as well as the runtime and selftests tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91258</commentid>
    <comment_count>1</comment_count>
    <who name="Teoh Jay Shen">jay.shen.teoh</who>
    <bug_when>2021-08-25 05:27:22 +0000</bug_when>
    <thetext>Hi Richard, I would like to propose my approach for this bug and seek for your opinions towards it. I created a patch which added a function to enable the system to write the build outputs into a testresults.json file and I would like to add those changes into the buildhistory.bbclass. 

Reason of applying those changes to buildhistory is because I had go through the buildhistory class and I found out that this class actually quite satisfied the goal of this bug, it is just that buildhistory doesn&apos;t write the build outputs into json files.  So I created this patch to document the build outputs into a testresult.json file. This json file will be stored under a folder called &apos;buildresult&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91259</commentid>
    <comment_count>2</comment_count>
      <attachid>4824</attachid>
    <who name="Teoh Jay Shen">jay.shen.teoh</who>
    <bug_when>2021-08-25 05:29:32 +0000</bug_when>
    <thetext>Created attachment 4824
Sample output

This is how the final testresults.json file will be generated</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91346</commentid>
    <comment_count>3</comment_count>
    <who name="Teoh Jay Shen">jay.shen.teoh</who>
    <bug_when>2021-09-07 00:16:39 +0000</bug_when>
    <thetext>Any comment or feedback?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91815</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-10-21 19:40:43 +0000</bug_when>
    <thetext>Richard, Can you look at the attachment and reply to Teoh?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91816</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-10-21 20:00:54 +0000</bug_when>
    <thetext>Sorry, I didn&apos;t see the reply until now, Randy pinged me on irc since I get a lot (too much) email from bugzilla.

I think the information we need in the testresults file needs to be tweaked a bit from this. For example, I think the image name should be a field in the json output in it&apos;s own right, not as part of a string of text. If we need that string, we should be able to generate it from the individual pieces of data.

I also think the branch and revision of the layer should be separate and specified for each later rather than the &apos; &quot; &apos; used in your example.

We also need to think about which variables the autobuilder varies in it&apos;s tests such as package format, init system and so on as these need to be recorded too. The exact list of variables to be recoded probably needs to be configurable.

So yes, buildhistory does recode some information but I think what we should put into testresult.json should be different.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91970</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-11-11 16:10:25 +0000</bug_when>
    <thetext>Teoh, can you work on this for M1 please.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91985</commentid>
    <comment_count>7</comment_count>
    <who name="Teoh Jay Shen">jay.shen.teoh</who>
    <bug_when>2021-11-12 02:50:08 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; Teoh, can you work on this for M1 please.

Sure Randy. I will start working on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93581</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-06-23 14:53:49 +0000</bug_when>
    <thetext>Teoh, if you can get to this, great but it&apos;s now unassigned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96440</commentid>
    <comment_count>9</comment_count>
    <who name="Trevor Gamblin">tgamblin</who>
    <bug_when>2023-09-14 15:45:49 +0000</bug_when>
    <thetext>Mistakenly moved this to M4. Since it&apos;s an enhancement, it should be 5.0 M1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97671</commentid>
    <comment_count>10</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-12-21 23:28:28 +0000</bug_when>
    <thetext>Bulk move of 52 5.0-M1 bugs to M2.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4824</attachid>
            <date>2021-08-25 05:29:32 +0000</date>
            <delta_ts>2021-08-25 05:29:32 +0000</delta_ts>
            <desc>Sample output</desc>
            <filename>testresults.json</filename>
            <type>application/json</type>
            <size>3033</size>
            <attacher name="Teoh Jay Shen">jay.shen.teoh</attacher>
            
              <data encoding="base64">ewogICAgImJ1aWxkX2NvcmUtaW1hZ2Utc2F0by1zZGtfMjAyMTA4MjQxNTUyMDkiOiB7CiAgICAg
ICAgImNvbmZpZ3VyYXRpb24iOiB7CiAgICAgICAgICAgICJJVEVNIjogWwogICAgICAgICAgICAg
ICAgIkJCX1ZFUlNJT04gICAgICAgICAgID0gXCIxLjQ2LjBcIiIsCiAgICAgICAgICAgICAgICAi
QlVJTERfU1lTICAgICAgICAgICAgPSBcIng4Nl82NC1saW51eFwiIiwKICAgICAgICAgICAgICAg
ICJOQVRJVkVMU0JTVFJJTkcgICAgICA9IFwidW5pdmVyc2FsXCIiLAogICAgICAgICAgICAgICAg
IlRBUkdFVF9TWVMgICAgICAgICAgID0gXCJ4ODZfNjQtcG9reS1saW51eFwiIiwKICAgICAgICAg
ICAgICAgICJNQUNISU5FICAgICAgICAgICAgICA9IFwiZ2VuZXJpY3g4Ni02NFwiIiwKICAgICAg
ICAgICAgICAgICJESVNUUk8gICAgICAgICAgICAgICA9IFwicG9reVwiIiwKICAgICAgICAgICAg
ICAgICJESVNUUk9fVkVSU0lPTiAgICAgICA9IFwiMy4xLjEwXCIiLAogICAgICAgICAgICAgICAg
IlRVTkVfRkVBVFVSRVMgICAgICAgID0gXCJtNjQgY29yZTJcIiIsCiAgICAgICAgICAgICAgICAi
VEFSR0VUX0ZQVSAgICAgICAgICAgPSBcIlwiIiwKICAgICAgICAgICAgICAgICJtZXRhICAgICAg
ICAgICAgICAgICAiLAogICAgICAgICAgICAgICAgIm1ldGEtcG9reSAgICAgICAgICAgICIsCiAg
ICAgICAgICAgICAgICAibWV0YS15b2N0by1ic3AgICAgICAgPSBcImR1bmZlbGw6MmE4NDhlOTUw
NzQzMThmM2EyNDNkZjdiM2Y0MDUxM2ExMzE3M2E4MlwiIiwKICAgICAgICAgICAgICAgICJtZXRh
LWludGVsICAgICAgICAgICA9IFwiZHVuZmVsbDpkOGJmODZhZTYyODhhZTUyMGI4ZGRkNzIwOWEw
YjQ0OGI5NjkzZjQ4XCIiLAogICAgICAgICAgICAgICAgIm1ldGEteXAtcWEgICAgICAgICAgID0g
XCJkdW5mZWxsOmE3NjFlMDYxMDBjOTljMjI3NDY0MTc1ODI4MWFlNDgyMjRlMTYzY2ZcIiIKICAg
ICAgICAgICAgXQogICAgICAgIH0sCiAgICAgICAgInJlc3VsdCI6ICJjb3JlLWltYWdlLXNhdG8t
c2RrIGhhcyBiZWluZyBidWlsdCBmb3JnZW5lcmljeDg2LTY0IgogICAgfSwKICAgICJidWlsZF9p
bWFnZV9jb3JlLWltYWdlLXNhdG8tc2RrXzIwMjEwODI0MTYxNzQxIjogewogICAgICAgICJjb25m
aWd1cmF0aW9uIjogWwogICAgICAgICAgICAiQkJfVkVSU0lPTiAgICAgICAgICAgPSBcIjEuNDYu
MFwiIiwKICAgICAgICAgICAgIkJVSUxEX1NZUyAgICAgICAgICAgID0gXCJ4ODZfNjQtbGludXhc
IiIsCiAgICAgICAgICAgICJOQVRJVkVMU0JTVFJJTkcgICAgICA9IFwidW5pdmVyc2FsXCIiLAog
ICAgICAgICAgICAiVEFSR0VUX1NZUyAgICAgICAgICAgPSBcIng4Nl82NC1wb2t5LWxpbnV4XCIi
LAogICAgICAgICAgICAiTUFDSElORSAgICAgICAgICAgICAgPSBcImdlbmVyaWN4ODYtNjRcIiIs
CiAgICAgICAgICAgICJESVNUUk8gICAgICAgICAgICAgICA9IFwicG9reVwiIiwKICAgICAgICAg
ICAgIkRJU1RST19WRVJTSU9OICAgICAgID0gXCIzLjEuMTBcIiIsCiAgICAgICAgICAgICJUVU5F
X0ZFQVRVUkVTICAgICAgICA9IFwibTY0IGNvcmUyXCIiLAogICAgICAgICAgICAiVEFSR0VUX0ZQ
VSAgICAgICAgICAgPSBcIlwiIiwKICAgICAgICAgICAgIm1ldGEgICAgICAgICAgICAgICAgICIs
CiAgICAgICAgICAgICJtZXRhLXBva3kgICAgICAgICAgICAiLAogICAgICAgICAgICAibWV0YS15
b2N0by1ic3AgICAgICAgPSBcImR1bmZlbGw6MmE4NDhlOTUwNzQzMThmM2EyNDNkZjdiM2Y0MDUx
M2ExMzE3M2E4MlwiIiwKICAgICAgICAgICAgIm1ldGEtaW50ZWwgICAgICAgICAgID0gXCJkdW5m
ZWxsOmQ4YmY4NmFlNjI4OGFlNTIwYjhkZGQ3MjA5YTBiNDQ4Yjk2OTNmNDhcIiIsCiAgICAgICAg
ICAgICJtZXRhLXlwLXFhICAgICAgICAgICA9IFwiZHVuZmVsbDphNzYxZTA2MTAwYzk5YzIyNzQ2
NDE3NTgyODFhZTQ4MjI0ZTE2M2NmXCIiCiAgICAgICAgXSwKICAgICAgICAicmVzdWx0IjogImNv
cmUtaW1hZ2Utc2F0by1zZGsgaGFzIGJlaW5nIGJ1aWx0IGZvciBnZW5lcmljeDg2LTY0IgogICAg
fSwKICAgICJidWlsZF9pbWFnZV9jb3JlLWltYWdlLXNhdG8tc2RrXzIwMjEwODI0MTY0MzI5Ijog
ewogICAgICAgICJjb25maWd1cmF0aW9uIjogWwogICAgICAgICAgICAiQkJfVkVSU0lPTiAgICAg
ICAgICAgPSBcIjEuNDYuMFwiIiwKICAgICAgICAgICAgIkJVSUxEX1NZUyAgICAgICAgICAgID0g
XCJ4ODZfNjQtbGludXhcIiIsCiAgICAgICAgICAgICJOQVRJVkVMU0JTVFJJTkcgICAgICA9IFwi
dW5pdmVyc2FsXCIiLAogICAgICAgICAgICAiVEFSR0VUX1NZUyAgICAgICAgICAgPSBcIng4Nl82
NC1wb2t5LWxpbnV4XCIiLAogICAgICAgICAgICAiTUFDSElORSAgICAgICAgICAgICAgPSBcInFl
bXV4ODYtNjRcIiIsCiAgICAgICAgICAgICJESVNUUk8gICAgICAgICAgICAgICA9IFwicG9reVwi
IiwKICAgICAgICAgICAgIkRJU1RST19WRVJTSU9OICAgICAgID0gXCIzLjEuMTBcIiIsCiAgICAg
ICAgICAgICJUVU5FX0ZFQVRVUkVTICAgICAgICA9IFwibTY0IGNvcmUyXCIiLAogICAgICAgICAg
ICAiVEFSR0VUX0ZQVSAgICAgICAgICAgPSBcIlwiIiwKICAgICAgICAgICAgIm1ldGEgICAgICAg
ICAgICAgICAgICIsCiAgICAgICAgICAgICJtZXRhLXBva3kgICAgICAgICAgICAiLAogICAgICAg
ICAgICAibWV0YS15b2N0by1ic3AgICAgICAgPSBcImR1bmZlbGw6MmE4NDhlOTUwNzQzMThmM2Ey
NDNkZjdiM2Y0MDUxM2ExMzE3M2E4MlwiIiwKICAgICAgICAgICAgIm1ldGEtaW50ZWwgICAgICAg
ICAgID0gXCJkdW5mZWxsOmQ4YmY4NmFlNjI4OGFlNTIwYjhkZGQ3MjA5YTBiNDQ4Yjk2OTNmNDhc
IiIsCiAgICAgICAgICAgICJtZXRhLXlwLXFhICAgICAgICAgICA9IFwiZHVuZmVsbDphNzYxZTA2
MTAwYzk5YzIyNzQ2NDE3NTgyODFhZTQ4MjI0ZTE2M2NmXCIiCiAgICAgICAgXSwKICAgICAgICAi
cmVzdWx0IjogImNvcmUtaW1hZ2Utc2F0by1zZGsgaGFzIGJlaW5nIGJ1aWx0IGZvciBxZW11eDg2
LTY0IgogICAgfQp9
</data>

          </attachment>
      

    </bug>

</bugzilla>