Bug 10720

Summary: patchtest: Create a script for OE-Core to fetch and set up environment for patchtest
Product: [Yocto Project Subprojects] Patchwork/Patchtest Reporter: Paul Eggleton <bluelightning>
Component: PatchtestAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: ross.burton
Version: unspecified   
Target Milestone: 2.4 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Paul Eggleton 2016-11-24 02:32:43 UTC
When I originally envisaged what became patchtest, I thought it would go into OE-Core itself so that users could easily run it over their patches before sending. For good reasons we didn't end up going down that route, instead having the mostly generic patchtest with the OE-specific parts in patchtest-oe. However we still want people to be able to easily run the tests locally.

Probably the simplest way of enabling this is to have a simple script that downloads the latest version of patchtest and patchtest-oe, sets up a virtualenv with the right contents (based on requirements.txt from each one) and then activates the virtualenv. It should also be runnable not just on initial setup but to update patchwork/patchtest and set up the environment each time you want to use it.
Comment 1 Leonardo Sandoval Gonzalez 2016-11-24 16:49:13 UTC
(In reply to comment #0)
> When I originally envisaged what became patchtest, I thought it would go
> into OE-Core itself so that users could easily run it over their patches
> before sending. For good reasons we didn't end up going down that route,
> instead having the mostly generic patchtest with the OE-specific parts in
> patchtest-oe. However we still want people to be able to easily run the
> tests locally.
> 
> Probably the simplest way of enabling this is to have a simple script that
> downloads the latest version of patchtest and patchtest-oe, sets up a
> virtualenv with the right contents (based on requirements.txt from each one)
> and then activates the virtualenv. 

Right, we should have some easy way to install.


>It should also be runnable not just on
> initial setup but to update patchwork/patchtest and set up the environment
> each time you want to use it.

what about a git-hook to do the update related repos and execute oe-tests? This can be quite intrusive but once the hook is set (with the setup script), no need to worry again.
Comment 2 Paul Eggleton 2016-11-24 19:02:34 UTC
Maybe, but that would be an additional step beyond - I'd want the ability to run the tests on-demand before we do that.
Comment 3 Leonardo Sandoval Gonzalez 2017-02-10 22:41:22 UTC
Patch sent to the ML:

http://lists.openembedded.org/pipermail/openembedded-core/2017-February/132592.html
Comment 4 Leonardo Sandoval Gonzalez 2017-03-13 17:14:42 UTC
Not merged during M3, so moving to next enhancement merge window.
Comment 5 Leonardo Sandoval Gonzalez 2017-06-08 13:56:00 UTC
Ross, this is pending for merging in master. Patch URL can be found on comment 3
Comment 6 Leonardo Sandoval Gonzalez 2017-06-14 17:08:48 UTC
Patch sent some time ago but still not merged
Comment 7 Leonardo Sandoval Gonzalez 2017-07-07 17:20:29 UTC
Patch merged at: (From OE-Core rev: 4ba1334ab7c9b32502a4f8b3e656fb4f8242ccdd)