summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2025-09-18 17:27:26 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-22 22:09:48 +0100
commited8544941bf47307a2e3bca39e5fa3a6a35dd447 (patch)
tree3ed82e5800852a0220b29778d865756df06b0a41 /scripts
parentcd493181d70e55a0c67535c5bd9661e224ef7237 (diff)
downloadpoky-ed8544941bf47307a2e3bca39e5fa3a6a35dd447.tar.gz
patchtest.README: update installation instructions
Update the installation instructions to demonstrate using a Python virtual environment to install the patchtest module dependencies. Also provide example #exactsteps. Using a virtual environment is considered a best practice for Python programs, but also makes the git-pw tool available in the user's PATH automatically. (From OE-Core rev: 82d5797c2bc40f0465e57dbc745f3ccccfed1067) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/patchtest.README74
1 files changed, 59 insertions, 15 deletions
diff --git a/scripts/patchtest.README b/scripts/patchtest.README
index 5a9dabc50b..bfbe29a379 100644
--- a/scripts/patchtest.README
+++ b/scripts/patchtest.README
@@ -26,26 +26,70 @@ https://git.yoctoproject.org/meta-patchtest/
26 26
27## Installation 27## Installation
28 28
29As a tool for use with the Yocto Project, the [quick start 29Patchtest checks patches which are expected to be applied to
30guide](https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html) 30Yocto layers. Therefore, familiarity with the Yocto Project, its
31contains the necessary prerequisites. In addition, patchtest relies on 31functionality, and image-build processes is assumed. Otherwise the
32several Python modules for parsing and analysis, which can be installed 32[quick start guide](https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html)
33by running `pip install -r meta/lib/patchtest/requirements.txt`. Note 33contains the necessary information.
34that git-pw is not automatically added to the user's PATH; by default, 34
35it is installed at ~/.local/bin/git-pw. 35As a Python application, the recommended way it should be installed
36(following Python best practices) is to use a virtual environment. A
37Python virtual environment provides a convenient sandbox into which its
38requirements can also be installed with out affecting a user's entire
39system at large. Patchtest makes use of a test suite found in oe-core,
40so it needs to be available as well.
41
42For example, to install patchtest into a Python virtual environment
43called "patchtest.venv" located at some/where in your filesystem:
44
45 $ mkdir -p some/where
46 $ cd some/where
47 $ mkdir yocto
48 $ pushd yocto
49 $ git clone https://git.openembedded.org/openembedded-core
50 $ git clone https://git.openembedded.org/bitbake
51 $ git clone https://git.yoctoproject.org/meta-patchtest
52 $ popd
53 $ . yocto/openembedded-core/oe-init-build-env build yocto/bitbake
54 $ cd ..
55 $ python3 -m venv patchtest.venv
56 $ . patchtest.venv/bin/activate
57 (patchtest.venv) $ pip install -r yocto/openembedded-core/meta/lib/patchtest/requirements.txt
58
59In the above list of cloned repositories, the meta-patchtest layer is
60only needed if you intend to use patchtest in "guest" mode. Also the
61oe-core + bitbake clones can be replaced with poky instead.
62
63If "guest" mode will be used, the meta-patchtest layer needs to be added
64to the conf/bblayers.conf file generated above.
65
66If you would like to run the patchtest selftest found in oe-core, the
67openembedded-core/meta-selftest (or poky/meta-selftest, if using poky)
68layer also needs to be added to bblayers.conf.
69
70Once the installation is done, your directory layout will look like:
71 .
72 ├── build
73 │   └── conf
74 ├── yocto
75 │   ├── bitbake
76 │   ├── meta-patchtest
77 │   └── openembedded-core
78 └── patchtest.venv
79 ├── bin
80 ├── include
81 ├── lib
82 ├── lib64 -> lib
83 ├── pyvenv.cfg
84 └── share
36 85
37For git-pw (and therefore scripts such as patchtest-get-series) to work, you need 86For git-pw (and therefore scripts such as patchtest-get-series) to work, you need
38to provide a Patchwork instance in your user's .gitconfig, like so (the project 87to provide a Patchwork instance in your user's .gitconfig, like so (alternatively
39can be specified using the --project argument): 88the project can be specified using the --project argument to git-pw on its
89cmdline):
40 90
41 git config --global pw.server "https://patchwork.yoctoproject.org/api/1.2/" 91 git config --global pw.server "https://patchwork.yoctoproject.org/api/1.2/"
42 92
43To work with patchtest, you should have the following repositories cloned:
44
451. https://git.openembedded.org/openembedded-core/ (or https://git.yoctoproject.org/poky/)
462. https://git.openembedded.org/bitbake/ (if not using poky)
473. https://git.yoctoproject.org/meta-patchtest (if using guest mode)
48
49## Usage 93## Usage
50 94
51### Obtaining Patches 95### Obtaining Patches