When we change documentation or board images, do not build all tests for
this board. Only add more tests when actual code has changed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When we change documentation or board images, do not build all tests for
this board. Only add more tests when actual code has changed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Allow running script locally. For example, on a local tree with local
changes:
./scripts/ci/run_ci.sh -b master -r upstream -l
This will be have the same way as in CI and creates a test manifest
based on changes.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We should not abort if west was initiaized, someone must have
initialized, i.e. locally and everything is already setup for us and
ready to go.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Incorporate these into run_ci.sh the same way that btsim results were
done. This adds a dependency on pytest.
Signed-off-by: Marti Bolivar <marti@foundries.io>
Commit 88ece494 ("ci: do not build docs in main CI job") removed the
call to build_docs but not the function itself. That makes it
confusing to try to find where it's called; remove it.
Signed-off-by: Marti Bolivar <marti@foundries.io>
The new west is able to initialize itself from an existing zephyr clone
without modifying it, adapt the CI script accordingly.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
West right now modifies the zephyr tree and points to master. In CI we
need to point to the pull-request HEAD instead, so so whatever shippable
does after cloning with west.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In order for check-compliance.py to be able to run cleanly out-of-tree,
set the repo (to be checked) path based on cwd, and refer to Zephyr and
its tools by the specific path set by ZEPHYR_BASE.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Before run_ci.sh was introduced, if some command in the
.shippable.yml script failed, Shippable would stop and report
a failure.
When run_ci.sh was introduced we lost this, which is pretty
dangerous if something fails cathastrophically and the xml
reports are not (properly) generated and copied, as then
Shippable reports a pass.
=> Run run_ci.sh in -e mode, so we propagate a bad failure upwards
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added a missing option in run_ci.sh to control the placement of the
xml results file. (Before it was just propagated thru the enviroment)
+
Changed .shippable to use this option when callign it.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This reverts commit 6d5ac1c089.
Looks like this was not correctly done, building btsim is needed on all
nodes.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Building docs and running various checks is now being done in another CI
job that runs in parallel and reports directly to the PR.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- Support sending status to github
- Support license checking
- Make every test a class
- Use junitparser instead of custom xml for junit output
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Compile and run the tests avaliable in bsim_bt
and collect the coverage results into the coverage report.
Also, detect if bsim's component folder already contains the
nRF52 HW models, and if it does instead of trying to fetch
them again (which will fail) check that the right versio is
present. This should ease testing locally.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
move CI scripting to a dedicated script. For example, to simulate what
is run in CI when a pull request is submitted:
./scripts/ci/run_ci.sh -b master -r upstream -p
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To avoid having to set it externally, set the SOC_DIR environment
variable directly in the compliance script.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The prefixes might be a leftover from the old 'option env="..."' symbols
(which are no longer needed). Since environment variables can be
referenced directly now, there's no point in having a prefix.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Threw an exception about Kconfig files not being found. They need to be
looked up relative to ZEPHYR_BASE.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use the new KCONFIG_STRICT Kconfiglib functionality, which makes the
library itself warn for references to undefined Kconfig symbols.
Also get rid of the chdir() hack. Kconfiglib now only looks up Kconfig
files relative to $srctree when it's set, so the hack is no longer
needed.
Remove list_undef_kconfig_refs.py. It's no longer needed.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
External projects might run check-compliance.py from a subdirectory,
while list_undef_kconfig_refs.py expects to find the top-level Kconfig
file in the current directory.
Due to obscure Kconfig ugliness (explained in a comment), the working
directory needs to be changed here, instead of using 'srctree'.
(Thinking of changing that Kconfig behavior so that it only applies to
.config files. Suspect it's been a bug in the C tools all along for
Kconfig files.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Update Kconfiglib to get upstream commit eb6c21a9b33a2 ("Turn
MenuNode/Symbol/Choice.referenced() into a @property") in. It converts
the MenuNode.referenced() function into a property, which makes the API
more consistent (read-only stuff uses properties).
Also update scripts/ci/list_undef_kconfig_refs.py to access .referenced
as a property.
Piggyback a small is_num() simplification.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add a helper module scripts/ci/list_undef_kconfig_refs.py that searches
the entire Kconfig tree and reports any references to undefined Kconfig
symbols. Use it to add a new check to scripts/ci/check-compliance.py.
Also allow list_undef_kconfig_refs.py to be run standalone.
Example error:
Error: Found references to undefined Kconfig symbols:
BAR
===
- Referenced at Kconfig:12:
config FOO
bool
depends on BAR
- Referenced at Kconfig:16:
menu "menu"
depends on BAR
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Allow check-compliance.py to be run from any path with a valid Git tree,
removing the unnecessary and artificial limitation imposed in the case
of gitlint.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Make sure committers have correct and valid git settings and verify that
the committer idenity matches one of the signed-off-by entries.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The file was opened as text, to avoid issues with UTF-8 in the future,
make it all binary and encode to UTF-8 correctly.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Check if any board files have changed and build more tests with this
board to uncover any build regressions.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This addition would catch tests being added or modified and would run
those tests with --all and catch issues with non default board
configurations before they get merged into the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>