Commit graph

348 commits

Author SHA1 Message Date
Fabio Baltieri 0daa3a78a9 yamllint: indentation: fix files in scripts/
Fix the YAML files indentation for files in scripts/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Fabio Baltieri 7dd902d035 yamllint: fix all yamllint comments-indentation errors
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>
2023-01-04 01:16:45 +09:00
Fabio Baltieri f33d43795d scripts: compliance: add a check for MAINTAINERS.yml format
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>
2022-12-29 14:42:02 +01:00
Fabio Baltieri e7a4aec3c9 scripts: compliance: check for bindings in subdirectories
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>
2022-12-28 19:01:57 +01:00
Fabio Baltieri 5bf79ed9cd scripts: compliance: use get_files filter for dts checks
Drop the custom logic to skip deleted files, use get_files filter
instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-12-28 19:01:57 +01:00
Fabio Baltieri afc2ad34bd scripts: compliance: move binding file cycle in run()
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>
2022-12-28 19:01:57 +01:00
Fabio Baltieri ab4d87dd41 scripts: compliance: add an ImageSize check
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>
2022-12-22 17:01:54 +01:00
Fabio Baltieri 30fd28d9f0 scripts: compliance: move isfile() check in get_files()
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>
2022-12-22 17:01:54 +01:00
Fabio Baltieri 5d23505336 scripts: compliance: fix DevicetreeBindingsCheck
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>
2022-12-22 17:01:54 +01:00
Carles Cufi c0455b836f scripts: ci: compliance: Remove Codeowners check
This check is no longer used and will be replaced by the maintainers
file, remove it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-12-20 17:34:35 +01:00
Stephanos Ioannidis 0e5762e56e scripts: compliance: Fix misdetection of Kconfig choices as undefined
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>
2022-12-13 17:20:10 +09:00
Anas Nashif bbf03fd991 ci: twister: fixed path for tag based filtering
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>
2022-12-02 07:31:37 -05:00
Katarzyna Giądła 14358aee1c twister: get information about memory footprint from build.log
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>
2022-11-29 16:17:32 -05:00
Evgeniy Paltsev ae79de1930 ARC: MWDT add TLS support
Add thread local storage support for ARC MWDT toolchain.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-11-29 09:48:23 +01:00
Carles Cufi 76499a6127 scripts: compliance: Move Kconfig-related items to the class
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>
2022-11-29 01:40:33 +09:00
Carles Cufi b8a6a510aa scripts: compliance: Resolve ZEPHYR_BASE in _main()
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>
2022-11-29 01:40:33 +09:00
Carles Cufi e60c1e024b scripts: compliance: Clean up ZEPHYR_BASE usage
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>
2022-11-29 01:40:33 +09:00
Carles Cufi 5f094fbbf5 scripts: compliance: Make line optional in fmtd_failure()
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>
2022-11-29 01:40:33 +09:00
Carles Cufi 28c2932a1d scripts: compliance: Consolidate 'git diff' calls in get_files()
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>
2022-11-29 01:40:33 +09:00
Carles Cufi 5fbfd72f9d scripts: compliance: Remove old TODO
This TODO doesn't seem to apply anymore based on its description, so
remove it altogether.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-29 01:40:33 +09:00
Carles Cufi bafec6bbde scripts: compliance: Remove unneeded workaround
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>
2022-11-29 01:40:33 +09:00
Carles Cufi a4600b0470 scripts: compliance: Use f-strings when appropriate
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>
2022-11-24 09:34:25 +01:00
Carles Cufi ba295755ce scripts: compliance: Add Nordic copyright
Add Nordic Semi as a contributor to this file.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-24 09:34:25 +01:00
Carles Cufi 4654bb6a1e scripts: compliance: Clean up import statements
Sort them alphabetically and by stdlib vs 3rd-party modules.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-24 09:34:25 +01:00
Carles Cufi d9aa61f74e scripts: compliance: Use subprocess.run()
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>
2022-11-24 09:34:25 +01:00
Carles Cufi b7cb3af443 scripts: compliance: checkpatch: Fix regex
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>
2022-11-24 09:34:25 +01:00
Fabio Baltieri 7b57d3c5bb scripts: compliance: check for binary files
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>
2022-11-21 16:12:04 -05:00
Carles Cufi 49b01b39b6 scripts: compliance: Remove unconditional debug output
This prevents us from parsing the scripts' output correctly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi 66ad0e68a6 scripts: compliance: Use consistent naming convention
Tests are named with CamelCase in general, use that in the names.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi 8c12efe2e5 scripts: compliance: Make test filtering case insensitive
To simplify using the -m and -e command-line options make the test
filtering case insensitive.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi 95053c8358 scripts: compliance: Fix DT Bindings check name
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>
2022-11-21 11:02:39 -05:00
Carles Cufi 8275457709 scripts: compliance: Fix wrong call
Fix call to parse_dt_bindings() in the Devicetree Bindings check.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Chris Friedt 5e7a86e1f9 scripts: compliance: add devicetree binding compliance check
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>
2022-11-20 13:12:44 -05:00
Carles Cufi 1e203ea15e scripts: compliance: Ensure lxml is installed
See https://github.com/weiwei/junitparser/issues/99.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-13 06:25:59 -05:00
Carles Cufi 1ee0d60990 scripts: compliance: Parse the pylint output
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>
2022-11-13 06:25:59 -05:00
Carles Cufi edd2c83dd4 scripts: compliance: Modernize pylint invocation
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>
2022-11-13 06:25:59 -05:00
Carles Cufi 8275d21a6c scripts: compliance: Add GitHub-compatible annotation support
Add support for GitHub workflow annotations, so that errors are
displayed inline with the Pull Request diff.

More info here:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#about-workflow-commands

Enable the new option in the compliance GitHub action.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-13 06:25:59 -05:00
Carles Cufi 89c3885c28 scripts: compliance: Add a new formatted failure method and class
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>
2022-11-13 06:25:59 -05:00
Carles Cufi e9415cf929 scripts: compliance: Rename add_failure to failure
For consistency with error() and skip(), rename add_failure() to
failure().

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-13 06:25:59 -05:00
Carles Cufi 2e66fac6d3 scripts: compliance: Fix inheritance of KconfigBasicCheck
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>
2022-11-08 07:20:21 -05:00
Carles Cufi aed9622a1e scripts: compliance: Allow for custom message and type
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>
2022-11-08 07:20:21 -05:00
Carles Cufi 72fde1b9b3 scripts: compliance: Generate one Result per issue encountered
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>
2022-11-08 07:20:21 -05:00
Carles Cufi 5ae70b9b77 scripts: compliance: Use standard TestCase class
No need to define a custom class anymore.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-08 07:20:21 -05:00
Carles Cufi f090efa793 scripts: compliance: Remove unused info message handling
No need to keep this in the tree if it's not used at all.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-08 07:20:21 -05:00
Carles Cufi c3933561b0 scripts: compliance: Use text setter/getters
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>
2022-11-08 07:20:21 -05:00
Anas Nashif e2cd634185 ci: also upload results of twiser a week full builds
Upload results of full runs we do twice a week to opensearch.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-07 14:20:02 -06:00
Anas Nashif 662aed81d2 actions: Upload test results to opensearch service
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>
2022-11-02 10:26:43 -04:00
Torsten Rasmussen 36ea41fad3 samples: introduce 'with_mcuboot' sample to show sysbuild feature
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>
2022-10-18 14:13:27 +02:00
Anas Nashif d8197f7535 ci: testplan: error out if we find mis-configured tests
If we find errors during test plan creation, stop execution and report
out the issues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-13 06:23:46 -04:00
Stephanos Ioannidis 3e706376e6 scripts: ci: test_plan: Specify ZEPHYR_BASE for list_boards
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>
2022-09-08 18:17:10 +09:00
Gerard Marull-Paretas e6fca0ef89 scripts: ci: check_compliance: ignore missing APP_LOG_LEVEL
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>
2022-09-07 11:18:27 +00:00
Yuval Peress 7187d8b7fc ztest: add framework tests for failed states
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>
2022-08-29 10:27:00 +02:00
Carles Cufi 8f0af41fd8 scripts: compliance: Add commit range info output
Log at the info level the commit range that the script is acting upon.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 0082dbfbd5 scripts: compliance: Remove unused command-line args
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>
2022-08-24 07:40:27 -04:00
Carles Cufi 73598db4db scripts: compliance: Tiny cleanup for -c
Use a common source for default and doc.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi c10a0f28b4 scripts: compliance: Clean up logging
- Add a choice in the cmd-line param
- Use the logger object everywhere
- Remove stale todo

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi d160d0c20c scripts: compliance: Complete transition to junitparser v2
Follow-up to b187477fe7.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 5ee76c97ab scripts: compliance: Remove unused variable
EDIT_TIP has not been used for a while now, remove it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Kumar Gala 4f84bc8f40 scripts/ci/check_compliance.py: Allow to run w/ZEPHYR_BASE
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>
2022-08-23 13:26:27 +02:00
Torsten Rasmussen 5fa4156462 doc: sysbuild documentation guide
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>
2022-08-12 13:56:55 +02:00
Henri Xavier b187477fe7 scripts: Upgrade to junitparser v2+
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>
2022-08-03 14:04:36 -04:00
Anas Nashif 0200da97c2 ci: fix pattern for skipping boards in testplan.py
boards have their own unique pattern, use that for proper skip.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-02 13:05:39 -04:00
Anas Nashif 5432cac806 ci: testplan: still run default tests with global changes
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>
2022-07-22 11:00:23 -04:00
Kumar Gala ccb9b6b5ba scripts: check_compliance: generate Kconfig.dts
Generate a Kconfig.dts to allow check_compliance to run.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 09:39:49 -07:00
Gerard Marull-Paretas d89dc22665 uncrustify: remove configuration file
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>
2022-06-15 09:37:30 -04:00
Stephanos Ioannidis f2b0991147 scripts: check_compliance: Fix broken links to Contribution Guidelines
This commit fixes the broken links to the Contribution Guidelines in
the Compliance Check script.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-17 13:40:27 -04:00
Anas Nashif f089f964fd twister: update ci options for twister
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>
2022-05-13 12:57:37 -04:00
Anas Nashif 7f3a62f2ce ci: keep old name of testplan file for now
Until we are ready to change workflow file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-05-13 12:16:57 -04:00
Anas Nashif 41cb42d4db ci: testplan converted to use json
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>
2022-05-13 12:16:57 -04:00
Aastha Grover eee56d8840 scripts/check_complaince: Add configs to UNDEF_KCONFIG_WHITELIST
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>
2022-05-12 07:39:06 -04:00
Anas Nashif 94b316eacf ci: testplan: limit test scope on global changes
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>
2022-05-06 08:19:49 -04:00
Stephanos Ioannidis 5a93798b22 Revert "scripts: check_compliance: check for commit message errors"
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>
2022-04-20 22:31:57 +09:00
Fabio Baltieri e61c534e52 scripts: check_compliance: check for commit message errors
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>
2022-04-15 10:35:09 -07:00
Anas Nashif 8c0b82d0b8 ci: remove buildkite/daily.yml from ignore list
This file does not exist anymore

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-03-24 09:44:11 -05:00
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Gerard Marull-Paretas 6b2391d000 scripts: ci: check_compliance: add check for boolean prompt text
Add a new check that enforces boolean's prompt to not start with
"Enable...".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Henrik Brix Andersen 57a9f0431b scripts: ci: test_plan: use common code for finding matching boards
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>
2022-02-28 07:31:19 -08:00
Gerard Marull-Paretas 724b042108 scripts: ci: check_compliance: check for (re)defined Kconfig symbols
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>
2022-02-21 19:35:21 -05:00
Anas Nashif 8e70d04193 actions: twister: build/run module tests and samples
This step was dropped when we moved to to GH actions, add it back.

Fixes #41305

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-09 19:47:36 -05:00
Anas Nashif f7cdea8510 ci: disable cbprintf tag filtering
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>
2022-01-27 10:32:02 -05:00
Anas Nashif ce60a91fb0 actions: twister: scale nodes up for large test coverage
If we determine we need more nodes than the default, do not override the
calculated number.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-01-06 07:32:20 -05:00
Anas Nashif 9cb2bc2c01 actions: clang: do not test all boards when --platform is given
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>
2021-12-09 16:23:22 +01:00
Anas Nashif 77a7df31e5 ci: fix test plan for smaller sets
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>
2021-12-05 10:53:50 -05:00
Anas Nashif 8d40928b2a actions: twister: determine nodes in python script
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>
2021-11-29 20:06:24 -05:00
Anas Nashif d52212b09a actions: fix filtering for clang action
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>
2021-11-29 20:06:24 -05:00
Anas Nashif 8b55275d48 ci: test_plan: fix pylint warnings
Fix some of the warnings reported by pylint.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-28 20:35:40 -05:00
Anas Nashif 053cc9fe62 actions: twister: run tests on all platforms when changed
When tests are changes, run them on all supported platformed, not only
integration platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-28 20:35:40 -05:00
Anas Nashif 0b2df8f41c actions: twister/clang: cleanup test plan generation
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>
2021-11-24 22:54:25 -05:00
Anas Nashif 5c24fcb4ae actions: run twister using github action
This action replaces current buildkite workflow and uses github actions
to build and run tests in the zephyr tree using twister. The main
differences to current builtkite workflow:

- the action handles all 3 events: pull requests, push and schedule

- the action determines size of matrix (number of build hosts) based on
  the change with a minimum of 1 builder. If more tests are built/run
  due to changes to boards or tests/samples, the matrix size is
  increased. This will avoid timeouts when running over capacity due to
  board/test changes.

- We use ccache and store cache files on amazon S3 for more flexibility

- Results are collected per build host and merged in the final step and
  failures are posted into github action check runs.

- It runs on more powerful instances that can handle more load.
  Currently we have 10 build hosts per run (that can increase depending
  on number of tests run) and can deliver results within 1 hour.

- the action can deal with non code changes and will not allocate more
  than required to deal with changes to documentation and other files
  that do not require running twister

The goal long-term is better integrate this workflow with other actions
and not run unncessarily if other workflows have failed, for example, if
commit message is bogus, we should stop at that check, to avoid wasting
resources given that the commit message will have to be fixed anyways
which would later trigger another run on the same code.

Currently there is 1 open issue with this action related to a github
workflow bug where the final results are not posted to the same workflow
and might appear under other workflows. Github is working on this bug.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-23 06:42:23 -05:00
Anas Nashif 46e3318dbd ci: hotfix: disable test exclusion by tags
Many tests and CI activties are being missed by excluding tests
mistakingly when running twister.
This is visibile when you change one or more tests in kernel/ for
example, twister does not run those tests that have changed at all and
marking the PR as tested and ready to be merged.

Temporary fix for #40235.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-10 22:37:21 -05:00
Anas Nashif 23ab949975 ci: inclusive language, use nodes instead of slaves
Fix the usage of the word slaves and replace with nodes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-10 08:04:26 -06:00
Anas Nashif 910e86af68 ci: do not run twister on footprint script changes
No need to run twister on changes to changes to scripts/footprint/*

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-29 12:26:36 -04:00
Torsten Rasmussen e2427ff671 scripts: check_compliance should not generate soc/shield Kconfig files
Fixes: #38463

With 6be1b2af9b then Zephyr shields and
soc Kconfig are always sourced from Kconfig directly.

However, check_compliance.py generates Kconfig files for sourcing the
same files thus sourcing the same files twice.
The end result is a lot of Kconfig warnings as described in #38463.

Removing the generated Kconfig files as this is no longer needed after
6be1b2af9b has been introduced.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-23 11:27:41 -04:00
Andy Ross 507e1154e3 scripts/check_compliance.py: Add kconfig false positives
New docs for cavs_v25 describe building a Linux kernel for a
Chromebook and need to talk about these kconfigs.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-09-03 07:19:34 -04:00
Torsten Rasmussen 36bb00d1f5 armclang: ARM Compiler C library support
Support for ARM Compiler C library.

This commit add support for the ARM Compiler C libary in:
- Kconfig
- libc/armstdc

A new Kconfig symbol is added to allow a toolchain to specify if they
support linking with the minimal C library.
Also the CMake variable `TOOLCHAIN_HAS_NEWLIB` is exported to Kconfig
so that CONFIG_NEWLIB_LIBS can only be enabled if the toolchain has
newlib.

The armclang toolchain selects the CMake scatter file generator and
disables support for the LD linker template which is not supported by
armlink.

For the ARM Compiler C library, a corresponding lib/libc/armstc/ folder
with a minimal implementation to work with the ARM Compiler C library
is added.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-30 08:54:23 -04:00
Martí Bolívar 6fe3c30af7 scripts: check_compliance: fix filter_py edge case
The filter_py() function is handed a bunch of file names and is
expected to give back just the python files.

Its input is the output from a 'git diff' command which normally when
used in the vanilla zephyr repository just prints regular files.

In situations where we're checking compliance on a repository with
submodules, however, filter_py() can be given directories in the
'fnames' list from the git output.

In the interests of being defensive and sharing infrastructure, just
handle this case in filter_py().

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-05 16:14:12 +02:00
Armando Visconti 351b28e122 drivers/sensor: lis2dw12: move int-pin in DTS binding
Take the int-pin information (i.e. what pin between INT1
and INT2 the drdy is attached to) directly from DT.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Kumar Gala 3641de91e0 ci/tags.yaml: Add entries for a few different tags
Add entries for bluetooth, cmsis_dsp, posix, and cbprintf.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-24 12:38:57 -05:00
Kumar Gala 0f7dde8ec1 ci/tags.yaml: Remove includes
Remove includes from the tag file.  If we have a change to an include
that implies some API change which may show up somewhere else so we
want to build as many tests/samples as possible in that case.

Also added a comment about keeing entries sorted alphabetically.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-24 12:38:57 -05:00
Kumar Gala 1bf5b70771 run_ci.sh: Fix setting of twister_exclude_tag_opt
We were testing modified_tags.args before we called get_twister_opt.py
so it would never have been created and thus twister_exclude_tag_opt
would never get set correctly.  Move the check to after we call
get_twister_opt.py

Also we need to remove modified_tags.args once we are done with it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-16 16:00:06 -05:00
Kumar Gala d736899504 run_ci.sh: add support for tag exclusion
Plumb modified_tags.args into run_ci.sh

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-15 11:39:23 -04:00
Kumar Gala d7773fba06 ci: Add twister tag support to get_twister_opt
Add the ability to map file/dir paths of a PR to twister TAG.  We
introduce scripts/ci/tags.yaml to conveys which files are associated
with which tag.

Since not all file/tags will be specified in tags.yaml we use the
combination of the files modified list and the tags.yaml information to
determine which tags can be excluded (ie if the file list doesn't match
any file in tags.yaml for a given tag listed there, we can that exclude
it).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-15 11:39:23 -04:00
Kumar Gala 168bdaadc5 run_ci.sh: Move creation of test_file.txt into a function
Make a single function that handles creation of test_file.txt and fold
get_tests_to_run into it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-10 07:53:58 -05:00
Kumar Gala 5e46a6453c run_ci.sh: Rename test_file_main to test_file_full
Rename test_file_main to test_file_full to be more consistent with the
usage of "full" elsewhere.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-10 07:53:58 -05:00
Kumar Gala 4e7a444131 run_ci.sh: rework logic to be a bit more consistent
Treat all test_file_* files the same and just explicitly set the header
in the final test_file.txt.  This makes the logic the same regardless of
what paths tests are coming from.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-10 07:53:58 -05:00
Kumar Gala fd8dabcb95 run_ci.sh: Fix what tests run with -l
If the local option (-l) was specified we were ignoring the results
of what_changed.py and always setting a "FULL" build.  Only explicitly
set a FULL run if we are building for a commit to the tree (local and
PR builds should respect the output of what_changed.py).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-10 07:53:58 -05:00
Kumar Gala 88cf35cb24 run_ci.sh: Rename master to main branch in example comment
Since we use 'main' now, rename the example comment usage to use
that branch name instead of 'master'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-10 07:53:58 -05:00
Carles Cufi 2189c08e4e ci: Add an errno.h check to CI
Add a very simple check that verifies that new error numbers are added
according to the errno.h file in newlib, in order to maintain
compatibility with it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-05-17 09:11:15 -04:00
Anas Nashif 01c1bcf724 ci: disable identifier_length scripts for now
This rules is not working as expected, so remove it for now.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-06 14:45:03 -04:00
Krzysztof Chruscinski d3b246464c scripts: ci: check_compliance: Extend UNDEF_KCONFIG_WHITELIST
Added SAMPLE_MODULE_LOG_LEVEL_DBG as an exception. Define is used
in the log_api test suite.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-06 15:40:05 +02:00
Anas Nashif d4e03991a0 ci: have twister cleanup artifacts as it goes
Avoid running out of space by cleaning up passing tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-05 18:48:45 -05:00
Anas Nashif bc4b4c5988 actions: cocci: remove boolean.cocci as it take too long
This script is taking too long on large files and is delaying the
action. Remove it for now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-03 17:11:12 -04:00
Anas Nashif 8ebc67ee0d action: timeout on scripts taking too long
Some scripts might take very long to execute, kill those after 10s and
let the action continue.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-03 17:11:12 -04:00
Anas Nashif b669f0c017 ci: fix regex in guideline_check.py
Also match _ in file names.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-03 08:08:25 -05:00
Anas Nashif e366d7948a ci: remove bsim from buildkit execution
We now have a dedicated action for this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-23 21:40:10 -04:00
Anas Nashif 70dc6b40ff ci: pylint: relax similar lines rule
We are getting hits on similar imports in different files, relax that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-13 16:33:18 -05:00
Flavio Ceolin a632c52f50 ci: guideline: Run script to check rule 14.4
Run script to check violations to rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-08 07:56:28 -04:00
Flavio Ceolin 0bbe5e4fda ci: coccinelle: Suppress pylint false positive
Suppress pylint false positive on 'sh' library.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-08 07:56:28 -04:00
Flavio Ceolin 58fdc01ca0 ci: coccinelle: Add support to write to a file
Add parameter to write the script output to a file.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-08 07:56:28 -04:00
Flavio Ceolin 8552542f6e ci: Apply coccinelle scripts in git diffs
This scripts receives the same parameter of what_changed.py. And run
coccinelle scripts for code guideline compliance in the given git
commits. e.g: ./guideline_check.py --commits origin/master..HEAD

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-08 07:56:28 -04:00
Gerard Marull-Paretas e14b44d720 scripts: ci: twister_ignore: remove old reference to .known-issues
Remove old reference to the .known-issues folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-08 09:55:16 +02:00
Carles Cufi e9e28c0562 ci: Re-enable bsim in CI
BabbleSim execution was (AFAICT mistakenly) disabled in
dda6a5ee90d0f5b31e7d269761dc2ab1a2f8510c. Re-enable it so we run them in
CI again.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-03-11 08:52:18 -05:00
Kumar Gala eea17e5441 ci: scripts/ci/run_ci: Cleanup file names
Rename test_file_[1..4] to something a bit more meaningful.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-08 08:35:56 -06:00
Anas Nashif 82daea910b ci: limit CI to only changed architecture
If files are changed for architecture code, then only run CI on those
architectures.

Combine all scripts into one and make it simpler.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-04 07:14:11 -06:00
Anas Nashif 28bc79b49f ci: do not run twister CI when changing checkpatch
changes to checkpatch have no impact on code and twister results.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-04 07:14:11 -06:00
Anas Nashif 3572b518f6 ci: remove shippable references
We now use buildkite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-04 07:14:11 -06:00
Torsten Rasmussen ea2ab69cf5 scripts: compliance.py updated to support KconfigBasic
This commit lets the Kconfig compliance check run from top of current
git repo instead of only executing inside ZEPHYR_BASE.
This extends the usability of the Kconfig compliance check.

Together with this possibility, a KconfigBasic mode has been added which
will execute the same verification for symbols in the Kconfig tree but
will not check for undefined symbols outside Kconfig.

This is needed as running Kconfig undef check outside the tree in
non-Zephyr repos might pickup `CONFIG_` named symbols in other code.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-30 08:09:49 -05:00
Kumar Gala 16567ccce5 ci: add .buildkite/daily.yml to twister ignore list
Changes to .buildkite/daily.yml don't make any sense to run twister
for since issues will only be seen when the daily builds run so add
it to the twister_ignore.txt list.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-29 10:19:52 -05:00
Torsten Rasmussen 3d88083bf1 cmake: zephyr modules: sanitize all module name when used as variable
The introduction of Zephyr module glue code in the Zephyr repository
introduces a Kconfig variable in the form of:
`config ZEPHYR_<MODULE_NAME>_MODULE`.

All Kconfig variables go into `autoconf.h`, therefore it is necessary
to sanitize the Kconfig variable, so that it does not contain special
characters. To ensure consistent variable name, then the module name
will be sanitized in all variable use in both Kconfig and CMake.
The sanitization is done be replacing all special characters with an
underscore, `_`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-20 12:59:19 +01:00
Torsten Rasmussen 3361b154ff scripts: check_compliance.py: include known Zephyr Kconfig glue code
Fixes: #31436

This fix adds ZEPHYR_<MODULE_NAME>_KCONFIG variable to compliance check.
This ensures that Zephyr Kconfig glue code is included in the
compliance check, and thus remove the issue reported in #31436.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-20 11:21:16 +01:00
Anas Nashif 5d50797dad ci: handle checpatch warnings as errors
Fail CI if we have both errors and warnings.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-14 17:29:37 -05:00
Marc Herbert 205dcdf636 check_compliance: fix broken format() in exception handler
Likely an accident when commit 288ae28c13 moved the script to the main
repo. Stayed unnoticed because this handler rarely ever runs.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-13 07:58:37 -05:00
Hake Huang d5c60ff2f1 test_version: update tset version with 12 digits
update the version with 12 digits in aligned with uniq request from

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-01-10 17:00:17 -05:00
Anas Nashif b2a5782570 ci: remove west extension call
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-08 07:49:19 -05:00
Anas Nashif f1dea627cc ci: fetch sof submodules
Fetch submodules needed to build with SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-06 07:53:46 -06:00
Anas Nashif 5be8afcf73 ci: update versions file with weekly label
Sync with version in test_results.
Set the version to be a weekly on Mondays.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-18 07:46:47 -05:00
Anas Nashif a05d056943 ci: rename sanitycheck -> twister
Change all CI scripts to use the new script name: twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Kumar Gala 52ad9a468c ci: run_ci.sh: retry failed west update for PR builds
We made a similar change for the nightly builds, but the PR builds
invoke run_ci.sh, so we need the same change here.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-11-23 14:42:54 -05:00
Torsten Rasmussen 4558ba7128 cmake: ensure shields can be placed in other BOARD_ROOTs
Fixes: #28462

This commit allows shields to be defined in other BOARD_ROOTs, either
using `-DBOARD_ROOT=<path>` or a Zephyr module defined BOARD_ROOT.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-11-13 13:36:48 +01:00
Gerson Fernando Budke 0d216924d5 samples: net: cloud: Introduce TagoIO IoT cloud http post
Introduce TagoIO IoT Cloud HTTP post client example.  This explorer
Zephyr network resources to demonstrate an end to end application.
The TagoIO allows that any user can test on a easy way Ethernet, WIFI
and Modem (PPP) with BSD sockets.  The example provides overlays to
configure WIFI and Modem.

The application consists an a pseudo temperature sensor that sends
periodically data to TagoIO IoT Cloud platform.  The data can be
visualized on a web browser dashboard, cellphone or tablet.  The
steps to configure TagoIO are described on the example documentation.

Special Variables:
 - CONFIG_TAGOIO_DEVICE_TOKEN   DEVID  token generated by TagoIO
 - CONFIG_TAGOIO_HTTP_WIFI_SSID SSID   when using WIFI
 - CONFIG_TAGOIO_HTTP_WIFI_PSK  PASSWD when using WIFI
 - CONFIG_MODEM_GSM_UART_NAME   UART   label when using MODEM
 - CONFIG_MODEM_GSM_APN         APN    when using MODEM

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-04 09:06:23 +02:00
Anas Nashif 4cd63abafd ci: add more fields to versions.json
Add date and if a commit should be considered for weekly testing.
This will still work with the old format.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-10-30 15:56:52 +01:00
Martí Bolívar a8612f75c5 scripts: dts: convert test suites to pytest
Use the pytest test framework in the dtlib.py and edtlib.py test
suites (testdtlib.py and testedtlib.py respectively).

The goal here is not to change what is being tested. The existing test
suite is excellent and very thorough.

However, it is made up of executable scripts where all of the tests
are run using a hand-rolled framework in a single function per file.
This is a bit all-or-nothing and prevents various nice features
available in the de-facto standard pytest test framework from being
used.

In particular, pytest can:

- drop into a debugger (pdb) when there is a problem
- accept a pattern which specifies a subset of tests to run
- print very detailed error messages about the actual and expected
  results in various traceback formats from brief to very verbose
- gather coverage data for the python scripts being tested (via plugin)
- run tests in parallel (via plugin)
- It's easy in pytest to run tests with temporary directories
  using the tmp_path and other fixtures. This us avoid
  temporarily dirtying the working tree as is done now.

Moving to pytest lets us leverage all of these things without any loss
in ease of use (in fact, some things are nicer in pytest):

- Any function that starts with "test_" is automatically picked up and
  run. No need for rolling up lists of functions into a test suite.
- Tests are written using ordinary Python 'assert'
  statements.
- Pytest magic unpacks the AST of failed asserts to print details on
  what went wrong in really nice ways. For example, it will show you
  exactly what parts of two strings that are expected to be equal
  differ.

For the most part, this is a pretty mechanical conversion:

- extract helpers and test cases into separate functions
- insert temporary paths and adjust tests accordingly to not match
  file names exactly
- use 'assert CONDITION' instead of 'if not CONDITION: fail()'

There are a few cases where making this happen required slightly
larger changes than that, but they are limited.

Move the checks from check_compliance.py to a new GitHub workflow,
removing hacks that are no longer needed.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-02 11:51:15 +02:00
Anas Nashif bb2d899c32 ci: run module tests only on major changes
Do not run module tests if core code isn't being changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-03 18:11:19 +02:00
Anas Nashif af83ccda68 ci: do not run full CI on only board changes
If we are only changing board code, do not build full sanitycheck, just
build the affected boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-03 18:11:19 +02:00
Anas Nashif 8b5e166f8e ci: run_ci: do not call buildkite-agent
Do not call buildkite here, this script should be callable to reproduce
CI results.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-03 18:11:19 +02:00
Anas Nashif d548a890b8 ci: do not run sanitycheck on MAINTAINERS.yml changes
Skip sanitycheck if we are only changing MAINTAINERS.yml

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-13 17:03:47 +02:00
Torsten Rasmussen 5f7cc8ded9 cmake: kconfig: support for multiple SOC_ROOT
This commit introduces support for multiple SOC_ROOT.

This means that additional SOC_ROOTs specified using -DSOC_ROOT as
argument to CMake will be forming a list together with ${ZEPHYR_BASE}.

This allows for greater flexibility, as developers can now specify
multiple out-of-tree SoCs and not worry about the SoC used for the
board they compile for.

Also it avoid code, such as:
if(BOARD STREQUAL my_board_using_out_of_tree_soc)
  set(SOC_ROOT some/out/of/tree/soc/path)
endif()
in application CMakeLists.txt.

Finally, allowing multiple SOC_ROOTs prepares for specifying SOC_ROOTs
in Zephyr modules.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-05 08:06:07 -04:00
Kumar Gala 33056e48c5 ci: make test_file.txt a build artifact for debug
Rather that echo'ng the test_file.txt to the console, lets just upload
it as a buildkite artifact.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-30 11:25:25 -04:00
Anas Nashif 314b8af797 ci: enable sanitycheck for integration
Enable sample for integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Kumar Gala feeda05323 ci: Add a debug out of what tests we are going to build
Add a cat of the test_file.txt so we can see exactly what tests are
expected to be built and run.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-24 12:10:15 +02:00