Bug 14303

Summary: Result of build is not stored in testresult.json with resulttool
Product: [QA/Testing] Tooling Reporter: Richard Purdie <richard.purdie>
Component: toolingAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium+ CC: jay.shen.teoh, mhalstead, paul, randy.macleod, tgamblin
Version: 5.0   
Target Milestone: 6.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Sample output none

Description Richard Purdie 2021-03-16 15:58:11 UTC
Whilst the outcome of tests like testimage, testsdk or oe-selftest are stored in testresult.json, there is no storage of "build" results like core-image-sato being built for qemuarm.

We'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.
Comment 1 Teoh Jay Shen 2021-08-25 05:27:22 UTC
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'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 'buildresult'.
Comment 2 Teoh Jay Shen 2021-08-25 05:29:32 UTC
Created attachment 4824 [details]
Sample output

This is how the final testresults.json file will be generated
Comment 3 Teoh Jay Shen 2021-09-07 00:16:39 UTC
Any comment or feedback?
Comment 4 Randy MacLeod 2021-10-21 19:40:43 UTC
Richard, Can you look at the attachment and reply to Teoh?
Comment 5 Richard Purdie 2021-10-21 20:00:54 UTC
Sorry, I didn'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'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 ' " ' used in your example.

We also need to think about which variables the autobuilder varies in it'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.
Comment 6 Randy MacLeod 2021-11-11 16:10:25 UTC
Teoh, can you work on this for M1 please.
Comment 7 Teoh Jay Shen 2021-11-12 02:50:08 UTC
(In reply to comment #6)
> Teoh, can you work on this for M1 please.

Sure Randy. I will start working on it.
Comment 8 Randy MacLeod 2022-06-23 14:53:49 UTC
Teoh, if you can get to this, great but it's now unassigned.
Comment 9 Trevor Gamblin 2023-09-14 15:45:49 UTC
Mistakenly moved this to M4. Since it's an enhancement, it should be 5.0 M1.
Comment 10 Randy MacLeod 2023-12-21 23:28:28 UTC
Bulk move of 52 5.0-M1 bugs to M2.