Commit Graph

388 Commits

Author SHA1 Message Date
Alexis Lothoré
2c0d9e1977 scripts/send-qa-email: reduce testresults shallow clone depth
Since we are now force-fetching base revisions and target revisions for
regression report generation, we can make testresults clone even more "shallow"
to increase clone speed in CI pipelines

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-07 21:51:47 +00:00
Alexis Lothoré
13b0ddac62 scripts/send-qa-email: force current revision fetch
If we try to run send-qa-email to simulate past releases (for example, for
development or debugging), the execution will very likely fail because the
target revision to examine (ie: the poky revision) is too old, and as a
consequence is not contained in the testresults shallow clone anymore (because
testsresults history keeps moving forward as builds are triggered on
autobuilder). As a consequence, force-fetch the "target" revision, as it is
already done for the "base" revision

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-07 21:51:47 +00:00
Alexis Lothoré
54d8e519f3 scripts/send_qa_email.py: add unit tests on previous version computation
The "previous version" computation bring many edge cases depending on the
version under release. Add a basic test suite to validate currently implemented
computation strategy and to prevent mistakes when ediiting it in the future

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:40:34 +00:00
Alexis Lothoré
d6018b891a scripts/send-qa-email: Generate regression reports against most relevant release
Instead of only generating regressions reports against HEAD of relevant branch, compute
most relevant tag (ie : release) against which we can check for regressions. General rules
introduced are the following :
- milestone release is checked against previous milestone if possible, otherwise
  against major release
- point release  is checked against previous point release if possible,
  otherwise against major release
- major release is checked against previous major release
- a non release build is checked against base branch
Examples :
- 4.1.2.rc1 is checked against yocto-4.1.1
- 4.1.2 is checked against yocto-4.1.1
- 4.1.1.rc1 is checked against yocto-4.1
- 4.1.1 is checked against yocto-4.1
- 4.1 is checked against yocto-4.0
- 4.1.rc4 is checked against yocto-4.0
- 4.1_M2.rc1 is checked against 4.1_M1
- 4.1_M2 is checked against 4.1_M1
- 4.1_M1.rc1 is checked against yocto-4.0
- 4.1_M1 is checked against yocto-4.0

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:40:29 +00:00
Alexis Lothoré
caf1e75312 scripts/send_qa_email.py: Wrap send_qa_email.py content in function
This wrapping allows importing send_qa_email.py in another script without
executing the QA emailing routine. This is useful for unit testing the script
internal functions

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:40:11 +00:00
Alexis Lothoré
8b16d49789 scripts/send-qa-email: add symlink to preserve compatibility with autobuilder
Merely renaming send-qa-email to send_qa_email.py would imply to update
yocto-autobuilder2 scripts, which can be daunting. In order to preserve
compatibility with current configuration, add a symlink pointing to the
new script

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:40:07 +00:00
Alexis Lothoré
5adb7a7dc3 scripts/send_qa_email.py: Rename send-qa-email to send_qa_email.py
This rename fixes send-qa-email regarding python guidelines, which allows to
import the script content in another script (for unit testing purpose for
example)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:40:02 +00:00
Michael Halstead
f195338438 run-docs-build: switch to released docs tarball
The pub/non-release directories have aged out and no longer work.
Switch to a stable location and bump the version to 4.1.2 as well.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2023-01-17 11:04:42 -08:00
Richard Purdie
655dd1c146 scripts/run-config: Only run bitbake command if environment file exists
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-14 21:06:38 +00:00
Richard Purdie
4cc1f44a22 scripts/run-config: Ensure bitbake server is shutdown at the end
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-14 12:35:10 +00:00
Alexander Kanavin
5843653181 config.json: add x86 (32 bit) ptest options
This will be particularly useful for testing Y2038 issues,
as that is the only 32 bit target that can be run at native speed
on the AB cluster.

Whether a-full should get fast ptests or full ptests can be decided
after collecting AB execution times for both.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-07 11:24:05 +00:00
Richard Purdie
5fee00855e yocto-metrics: Add langdale CVE monitoring
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-28 13:30:19 +01:00
Quentin Schulz
0c8395c947 scripts: run-docs-build: make the workdir pristine between tries
It happened that the git repositories were dirty and resulted in
incorrect files being used. Let's use git clean -ffdx to force a
completely clean git repositories before and after checking out a branch
so that nothing is left from or to another branch build. Also git reset
--hard to undo changes to tracked files.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Reported-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> #https://lore.kernel.org/yocto-docs/e50abe3c777e4a23a752a3ec25ad0b2a@axis.com/
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-27 17:37:18 +01:00
Michael Halstead
1e0cd71f65 scripts/run-docs-build: make nested dirs for contrib/name/* branches
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2022-10-18 13:46:53 -07:00
Richard Purdie
effb9b0fcd scripts: Ensure gplv2 revision isn't listed and repos aren't used
We disabled meta-gplv2 for master, ensure the repo isn't used in the
collection or QA scripts.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-26 13:01:37 +01:00
Richard Purdie
cc0005d364 scripts/patchmetrics-update: Improve debug output
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-20 15:56:25 +01:00
Alexander Kanavin
e18974a86c scripts/run-patchmetrics: remove conf/templateconf.cfg as well between builds
With the recent template config changes to oe-core its content is no longer
backwards compatible.

'-f' is to guarantee future compatibility with build setups where the file
is not present.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-02 11:43:59 +01:00
Richard Purdie
b7ee72be92 scripts/archive_buildstats: Exit early if buildstats isn't present
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-24 20:56:12 +01:00
Aryaman Gupta
c054c03e4f scripts/archive_buildstats.py: archive buildstats to tar.zst
Archive the buildstats of every failed build and 1% of random builds. Convert
the time-stamped buildstats directory to a compressed tarball using the
hostname as a prefix (to the file name only) so that one can identify the
source machine. Move these tarballs to the directory:
	testresults/<build_name>/buildstats/

The archiving is performed during the "collect results" step.

Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-23 23:35:47 +01:00
Quentin Schulz
a9f5454b30 scripts/run-docs-build: do not checkout releases.rst from master anymore
Master branch of the yocto-docs now autogenerates the releases.rst file
and the file therefore does not exist anymore.

Signed-off-by: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-20 14:25:19 +01:00
Quentin Schulz
695bd33b47 scripts: run-docs-build: use latest version of set_versions.py script
`git checkout <pathspec>` without <tree-ish> only undo the changes made
to pathspec compared to HEAD. It is not guaranteed that HEAD is on
latest commit of master branch from upstream when running this script,
therefore let's add the <tree-ish> argument to specify which branch to
use to make sure set_versions.py is the latest, otherwise getlatest
might return the wrong information.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-20 14:25:19 +01:00
Richard Purdie
a263c0b0d3 srcipts/generate-chartdata: Drop dateutil dependency
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-30 16:33:54 +01:00
Richard Purdie
400e1e1b2b scripts/utils: Allow tags to be updated from upstream (meta-agl has force pushed them)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-29 16:44:03 +01:00
Richard Purdie
54630b14ce scripts/run-patchmetrics: Ensure cve data for last year is copied
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-29 07:45:46 +01:00
Richard Purdie
01f4920d78 scripts/generate-charts: Add json data for last year as well as multiyear
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-29 00:04:23 +01:00
Richard Purdie
70cdf365ef run-docs-build: Switch to newer docs tarball
This updates docs generate to a newer version of sphinx.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-23 13:31:41 +01:00
Michael Opdenacker
a1575b063b run-docs-build: allow build warnings again
This allows to switch to a more recent of Sphinx
which will generate warnings with old versions of docs.

This way, it's not immediately necessary to patch
all such versions.

This commit reverts
https://git.yoctoproject.org/yocto-autobuilder-helper/commit/?id=8273124feb9da2ffe93fcee7c4529d5597e1684a
which originally reverted
https://git.yoctoproject.org/yocto-autobuilder-helper/commit/?id=931d409b255a85f2217ca093d8391a678ce00ddb

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-23 13:30:26 +01:00
Richard Purdie
1baf966db6 run-docs-build: Ensure origin is specified for master
We may not have fetched the master revision if a different one was being
built so using origin/master works consistently in all cases.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-23 13:29:56 +01:00
Richard Purdie
3921d4f3ec scripts: Ensure directories exist
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-14 22:09:16 +01:00
Richard Purdie
9d7820da27 scripts/docs_add_banner: Fix several issues
* Fix a syntax error causing the script to fail
* Skip symlinks files (symlink directories were already skipped)
* Drop unneeded whitespace
* Abstract path join to a variable

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-03 10:51:38 +01:00
Abongwa Amahnui Bonalais
5dd90ea43b scripts/docs_add_banner: Add a banner on the old documentation docs.
Add a script which adds banners to the old docs and outdated dunfell docs
so that the user knows they're using old documentation.

Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-03 10:51:08 +01:00
Quentin Schulz
9ebeb61276 scripts: run-docs-build: do not extract eclipse directories from old docs
For some reason, the old docs tarball includes many eclipse
subdirectories which are just cluttering the docs website up.

Therefore, let's just not extract eclipse directories from the tarball.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-01 09:14:58 +01:00
Richard Purdie
a772bf318d scripts/cve-generate-chartdata: No need to exlude db
These are already handled in all branches we care about so drop the exclusion.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-25 17:55:12 +01:00
Richard Purdie
60902768cc scripts/run-patchmetrics: Drop honister, remove oldder json files
Keeping all the previous json files in tree has too much overhead
so drop the old ones. Honister doesn't support cve-check with json.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-25 17:52:39 +01:00
Richard Purdie
47d8883222 scripts/run-patchmetrics: Continue CVE checks for honister for now
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-25 09:46:15 +01:00
Richard Purdie
10ecb12155 scripts: Add script to update CVE count data in json file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-25 08:32:19 +01:00
Richard Purdie
6655466ea6 scripts/run-patchmetrics: Seperate out cve-check json files into direcotries
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-24 15:21:23 +01:00
Richard Purdie
573aee4421 scripts/patchmetrics-generate-chartdata: Remove unused data
When generating the chart specific data, remove elements which aren't
used to reuse the filesize which improves browser loading speed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-24 11:05:17 +01:00
Richard Purdie
7c7b96cf19 scripts/patchmetrics-update: Fix typo
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 23:18:37 +01:00
Richard Purdie
803bdecd62 scripts/run-patchmetrics: Ensure tmpdir is clean between build runs
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 22:56:23 +01:00
Richard Purdie
125f1dbea4 scripts: Add patch to filter the chart data to make it usable
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 22:54:54 +01:00
Richard Purdie
c491e01653 scripts/run-patchmetrics: Ensure environment works for dunfell
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 22:11:19 +01:00
Richard Purdie
e3beeb9328 scripts: Extend CVE testing to kirkstone and dunfell branches
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 16:22:35 +01:00
Richard Purdie
7eca1ae4d7 scripts: Add ability to add/process missing patch stats data
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-23 16:05:23 +01:00
Richard Purdie
ca67ed751e run-patchmetrics: Add very basic cve-check functionality
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-17 17:14:13 +01:00
Richard Purdie
8702fdbb72 Clarify license and copyright information
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-17 10:29:45 +01:00
Richard Purdie
348467c2c8 run-patchmetrics: Use -m for realpath for results dir as it doesn't exist
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-13 17:21:45 +01:00
Richard Purdie
5b73a9b6eb run-patchmetrics: Use full variable names
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-13 17:19:17 +01:00
Richard Purdie
fd1aa61d87 scripts/run-patchmetrics: Ensure paths are sanitized
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-13 16:39:59 +01:00
Richard Purdie
1887e59889 config/scripts: Allow publishing of patch metrics
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-13 16:37:10 +01:00