[OE-core] [PATCH 1/4] oeqa/core/runner: write testresult to json files

Yeoh, Ee Peng ee.peng.yeoh at intel.com
Mon Oct 22 10:53:00 UTC 2018


Hi Richard,

I had refactor and incorporate the inputs your provided, submitted the patches for your review.
Thank you very much for your attention and sharing!

http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156945.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156946.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156947.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156948.html

Thanks,
Yeoh Ee Peng 

-----Original Message-----
From: richard.purdie at linuxfoundation.org [mailto:richard.purdie at linuxfoundation.org] 
Sent: Monday, October 22, 2018 5:34 PM
To: Yeoh, Ee Peng <ee.peng.yeoh at intel.com>; openembedded-core at lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/4] oeqa/core/runner: write testresult to json files

On Mon, 2018-10-22 at 08:59 +0000, Yeoh, Ee Peng wrote:
> Hi Richard
> 
> Current codes does load existing testresult json file if it exist, 
> then it will write the new testresult into it based on the result_id.
> > +    def _get_testresults(self, write_dir):
> > +        testresults = {}
> > +        file = os.path.join(write_dir, self.testresult_filename)
> > +        if os.path.exists(file):
> > +            with open(file, "r") as f:
> > +                testresults = json.load(f)
> > +        return testresults

I managed to miss that function and call, sorry. That should be fine. I think we may want to inline some of these functions to make things clearer.

> I did have the same thinking on if we can have a common function to 
> manage configuration and result_id or let individual test classes to 
> manage it, in the end, the thinking was configuration/result_id were 
> really responsibility of each test classes, where the json helper 
> class inside runner shall not have the knowledge or know-how on 
> configuration/result_id. Thus the decision in the end was to make json 
> helper class responsibility as simple as to consume the configuration, 
> results, result_id information provided by the test classes. Hope this 
> explain the reason behind current design.
> 
> Thank you very much for your attention & knowledge sharing! 

You could just do what amounts to getVar("LOGDIR") + "/oeqa" and have that as the default test result location?

Cheers,

Richard





More information about the Openembedded-core mailing list