WebP images are smaller for similar resolutions and quality while being
compatible with web browsers and other image processing tools.
For higher resolution images, be sure to limit the display size to make
the rendered pages look reasonable.
This was approved by Benjamin Cabé (@kartben) in this discussion thread:
https://github.com/zephyrproject-rtos/zephyr/pull/55488#issuecomment-1461792751
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
To get consistent and 1 single rundate per CI run, set run_date when
we upload the data. This is optional mostly for CI and to avoid
duplication when we re-run jobs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This should fix issue like #54337 where architecture code changes were
filtering out kernel tests, where those changes are being tested. Kernel
and arch code is tightly coupled and we need to run kernel tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change the check_compliance main invocation to pass an explicit argv
list from main to parse_args(). This does not change anything for direct
invocation, but allows wrapping the compliance script and using it as a
library while controlling its behavior by passing the intended flags to
main().
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move away from opensearch and switch to elasticsearch for reporting.
The results will be available at https://kibana.zephyrproject.io/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enables running CI checks which will now search for initialisation
of argument parser where abbreviations are not disabled.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Support running the compliance check script without writing the output
to any file.
This adds a check for the --output flag to not write to the output file
if the value is empty, and add a second flag for inhibiting the
individual case files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a YAMLLint compliance check that uses the yamllint package to report
linting error on YAML files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix all comments-indentation errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(comments-indentation)'
This checks that the comment is aligned with the content.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a compliance check that tries to load MAINTAINERS.yml with
get_maintainer.Maintainers() if it's been modified by the CL, and fail
compliance if it fails to be parsed.
Example output:
```
ERROR : Test MaintainersFormat failed:
Error parsing MAINTAINERS.yml: MAINTAINERS.yml: YAML error: while
scanning a simple key
in "MAINTAINERS.yml", line 976, column 1
could not find expected ':'
in "MAINTAINERS.yml", line 977, column 3
```
```
ERROR : Test MaintainersFormat failed:
Error parsing MAINTAINERS.yml: MAINTAINERS.yml: glob pattern
'drivers/regulator' in 'files' in area 'Drivers: Regulators' matches a
directory, but has no trailing '/'
```
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change the bindings file filter to check for "dts/bindings/" as a
substring rather than prefix. This makes the check catch files in
subdirectories as well (for sample tests and samples), and makes the
check usable on external projects where the bindings may not live in the
project root.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move the file iteration loops of the bindings compliance check in the
callers, so that if we add more checks we don't have iterate on each one
of them and a check works on a single file.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a check to validate and limit the size of images in the repository,
setting stricter limit for files in boards/.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Git normally only works on files, but can include directories if there's
any submodule in the repository. This is currently checked in
filter_py(), move the check into get_files() so it does not have to be
copied around.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
DevicetreeBindingsCheck is missing the splitlines() call to process the
get_files() output, hence cycling through each character of the output
rather than each file, which causes the check to never run on anything.
Fix it by moving the splitline call into get_files() itself, since every
caller is going to use it anyway.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit updates the KconfigCheck to add the Kconfig symbols from
both "config" and "choice" symbol lists to the defined symbol list, as
opposed to the "config" list only, in order to prevent any references
to the choice symbols outside the Kconfig files (e.g. in documentation)
from being reported as undefined.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
path for posix was not being matched correctly due to a missing /. So
some posix tests were excluded and not excercised.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit calculate memory footprint from build.log and
proposes an alternative approach to #2465.
Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Both get_defined_syms and UNDEF_KCONFIG_WHITELIST are used exclusively
by the Kconfig check, so move them to the class.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Instead of globally resolving ZEPHYR_BASE, move it to _main() so we can
catch potential exceptions when doing so and for consistency with the
rest of globals, like GIT_TOP. This also includes documenting a new
"<zephyr-base>" path hint for classes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The global variable ZEPHYR_BASE is always set in the script, so no need
to check for its existence.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some errors are attributable to a specific file, but not a specific line
within that file. Allow for formatted errors that refer to a file but
not a line.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Many tests invoke `git diff` independently with very similar parameters
to obtain a filtered list of files.
Consolidate those into a new `get_files()` function.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The workaround for old pytest bug
https://github.com/PyCQA/pylint/issues/2906
is not required anymore after more than 3 years, so remove it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
There were many instances in the code where f-strings were more
appropriate or fitting, change those to use them.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
As per the current Python documentation, use subprocess.run() since the
other, older methods are not recommended anymore.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The checkpatch regex matched too greedily, so that descriptions with ":"
would match too much, example:
-:20: ERROR:SPACING: spaces required around that '=' (ctx:VxW)
Would match "SPACING: spaces required around that '=' (ctx" instead of
just "SPACING".
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a compliance check that fails if the diff is adding any binary file
to prevent committing them by mistake.
Only check for added files and explicitly allow image files in doc/ and
boards/.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Check names must not contain spaces, since they are passed via `-m` in
the command-line.
Also update .gitignore and compliance.yml.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add `DevicetreeBindingsCheck` and `required_false_check()`, which
checks to make sure that no new Devicetree bindings add the
redundant `required: false` property.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Parse the output generated by pylint and store it as FmtdFailure
instances, so that they can be annotated later.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The current recommended API call for subprocess instantiation is run(),
so replace the low-level Popen and communicate() with it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Format the JUnit failure according to the standard:
https://www.ibm.com/docs/en/developer-for-zos/14.2?topic=formats-junit-xml-format
This also includes a new FmtdFailure class, which will be used in
subsequent commits to implement GitHub-compatible annotations. A list of
FmtdFailure instances is kept in the ComplianceTest instance because
the TestCase instance cannot restore classes derived from Result that
the junitparser module doesn't know about.
Use the new function to format checkpatch errors.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
KconfigBasic should not be inheriting from both KconfigCheck and
ComplianceTest. This was a workaround to find all inheritors of
ComplianceTest, so fix the inheritors search instead.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Instead of arbitrarily storing the string provided by the caller in
either the message attribute or the element text, let the reporter
choose instead.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Instead of accumulating failure information in a single Result instance,
located at index 0, generate one Result sub-class instance per
failure/error/skip as it is intended in the original library.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The junitparser Python module now comes with a setter and getter for
Result.text, use them instead of peeking into the underlying XML.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
On push, upload test results to opensearch for analysis and reporting.
Goal is to use this data to understand test coverage better and use this
services for all test reporting, also for results coming from testing on
hardware.
Opensearch is currenly being used for evaluation, we are considering
the switch to elasticsearch later.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample is intended to show users how they can create a sample which
has dedicated configuration files for extra images included in a build.
MCUboot is used as example on how its default can be adjusted and
MCUboot itself automatically be included in the build when using
sysbuild.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The commit c3620c8a8e changed the
`list_boards` script such that it no longer searches the boards from
the `ZEPHYR_BASE` path by default.
This commit updates the `test_plan` script to invoke the `list_boards`
script with the `ZEPHYR_BASE` as a search path.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Application log level is not detected correctly as the option is defined
using a template, so it can't be grepped.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add specialized tests that execute another test indirectly and ensure
that the results report errors correctly. See the README.rst file
provided with this commit for details.
Signed-off-by: Yuval Peress <peress@google.com>
There were a bunch of old command-line arguments that haven't been used
in a while, remove them.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Tweak check_compliance.py to allow user to run it w/o having
ZEPHYR_BASE set. This is similar to what we do for twister.
Signed-off-by: Kumar Gala <galak@kernel.org>
This is this initial sysbuild guide on what sysbuild is and how to build
a sample using sysbuild.
It provides an architectural overview of sysbuild.
Descriptions on how to use `west build` or `cmake` + `ninja` to build
projects with the sysbuild infrastructure.
Flashing is described through the use of `west flash`.
Extending sysbuild with additional Zephyr based applications are
described, and reference to CMake documentation for including non-Zephyr
based applications are provided.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
There is a breaking change in Junitparser 'TestCase.result' between
v1.x and v2.x.
Update check_compliance.py minimally to take into account this change.
This avoids relying on an outdated package.
Signed-off-by: Henri Xavier <datacomos@huawei.com>
In cases of global changes where 100s of nodes are launched, i.e. on
samples and tests (more than 20 tests/samples changed), do a full
covrage run.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove uncrustify configuration file in favor of using clang-format, a
tool that is nowadays more popular/powerful for code formatting.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit fixes the broken links to the Contribution Guidelines in
the Compliance Check script.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Now that we have partially oerhauled twister in the tree, modify actions
with new options:
- not reporting filtered tests is now default
- output is json, not csv
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
twister now exports json instead of csv, so we make the testplan read
the json data and generate the consolidated plan for the workflow.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adding LOG_BACKEND_MOCK_OUTPUT_DEFAULT &
LOG_BACKEND_MOCK_OUTPUT_SYST to UNDEF_KCONFIG_WHITELIST as Kconfig
options generated by a template under testcases are not
identified by Compliance check by default.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
When doing global changes, like typo fixes or header changes, keep
default scope and do not build each test for each platform.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reverts commit e61c534e52, which
enabled commit message checking via the checkpatch script.
The checkpatch commit message checking is currently causing more
problems that it fixes, for example:
1. the rules that are supposed to be specific to the "header" (commit
message) are being applied to the diffs.
2. there are some rules that do not fully make sense for the Zephyr
and the way we have been doing things.
Note that we currently have the 'gitlint' checking the commit messages,
so reverting this feature does not completely take away the commit
message checking in the CI.
If we are to ever re-introduce this feature, all of the aforementioned
issues need to be addressed, and the effects and ramifications of
enabling this feature must be thoroughly analysed.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Change CheckPatch() compliance test to call checkpatch.pl directly
rather than through git diff. This has the advantage of including the
commit message in what is being checked, which is useful to catch stuff
like spurious Gerrit commit ids.
The --mailback does not seem to work correctly in this mode, but since
the output is filtered by checking the command exit code anyway, that
option is redundant, so drop that as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Use the common code in scripts/list_boards.py for finding matching
boards in scripts/ci/test_plan.py. This has the benefit of not trying to
use board revisions files as board names.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Kconfig symbols must not be defined in Kconfig.defconfig.* files. Such
files are meant to change the default value of certain options.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Need a better way or tagging for this area, we have been introducing
regressions that were undetected due to those filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If we are invoking testplan for only one board, do not bother with other
board related changes, just generate plan for the specified platform.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We were missing smaller sets and skipping tests when the set is smaller
than the allowed number of tests per node.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Improve calculation of matrix and move calculations from workflow to the
testplan script. We now generate a file that can be parsed by the action
with the data needed to start twister with the right number of nodes.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not invoke --integration when dealing with one platform only and
generate testplan only for the needed platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Merged 3 files used to generate the test plan per PR based on the
changes. 2 python scripts and a shell script are now all merged into 1
python script that generates the input file for twister based on a list
of changed files by the PR.
This remove lots of old and obsolete code and simplifies things a bit,
no need anymore for an intermediate script to call twister, we call it
directly in the workflow and use the new test_plan script to generate
the test plan.
This also reenables the recently disabled tag based filtering which had
a bug, bug is resolved in this new implementation.
On push events, we now run twister without the --integration option to
catch any issues in the main branch that were not caught in PRs. PRs
continue to run with --integration enabled. This event (push) is now run
on 15 builders due to the increased size.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>