Commit graph

348 commits

Author SHA1 Message Date
Anas Nashif b8c7de6d9a actions: update daily version for testing
Update versions.json with the daily commit that device testing will be
performed on.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-09 11:29:56 +02:00
Martí Bolívar 148542c080 build: remove dead stores to environment
Now that kconfigfunctions.py is loading the EDT object from a pickle
file, I can't find any other reads of the environment variables it was
previously using to do that.

(The CMake variables with the same names are read in different places;
I'm specifically talking about environment variables here.)

Remove the dead stores.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-07-08 14:02:44 -05:00
Anas Nashif 3cb1b437d2 ci: do not run sanitycheck on linter config changes
Do not run sanitycheck on linter configuration changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-03 07:58:31 -04:00
Anas Nashif 33c21e1f7d ci: do not skip BT simulator tests
BT simulator tests run standalone and independent of sanitycheck and
might be triggered by tests that are not managed by sanitycheck, so
leave it alone.

Fixes #26508

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 12:16:37 -04:00
Anas Nashif 5f200ee8bf ci: do not run sanitycheck on action changes
changes to actions should not trigger sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 10:27:57 -04:00
Anas Nashif 288ae28c13 ci: add compliance checking via GH actions
Move check_compliance script to main tree and adapt/use with GH actions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-12 07:53:09 -04:00
Kumar Gala 491bbad8e8 ci: Update for buildkite environment
* Tweak west_setup:
  - log `west update` to a file to reduce noise in log
  - use `west forall` + `git reset` to make sure files are checked out
    (this is to handle a possible module cache)
* Output when we start sanity_check.  Add a banner for when we run
  sanity_check so it's a bit easier to find in console logs

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-09 15:28:48 -04:00
Anas Nashif 7ee9a0328b ci: changes to python requirements should not trigger sanitycheck
Those have no impact on code and should not trigger full sanitycheck
run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-06 11:07:22 -05:00
Anas Nashif 19ad25fc9b ci: fix whatchanged script matching
When files were added, matching did not work and we were counting added
files twice. Use sets to make sure we have a unique list of files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-04 09:07:00 -05:00
Anas Nashif 337e8e6361 ci: if we are only changing doc/ files, no sanitycheck run
If we are only changing files in doc/*, there is no need to run full
sanitycheck...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-11 08:40:54 -04:00
Anas Nashif 29c0c08fd4 ci: do full sanitycheck if not a PR
Cover the cases where we run sanitycheck on a merged PR.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-01 17:20:56 -04:00
Anas Nashif 270165428c ci: do not run full sanitycheck if not needed...
if we are changing a test or a sample, there is not need to run
everything, it is enough to just build/run the changed test/sample.

Also, some files have impact on the code and if they are being changed,
do not run fully sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-01 14:00:57 -04:00
Anas Nashif 0e558059d1 ci: detect what changed in a PR and if full sanitycheck is needed.
Script to detect if full sanitycheck should run or if we can skip it and
just run the code that actuallt changed (in samples/tests).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-01 14:00:57 -04:00
Anas Nashif c7092a1c4d ci: when merging files, keep one header row
When merging files, make sure to remove header rows from each file and
just keep one header. This will stop us from parsing header rows as
tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-03-24 12:15:36 -04:00
Kumar Gala 2fd7876aa7 ci: github: west: Add a GH workflow to run the west command tests
Replace running west command tests in run_ci.sh with a github workflow.
This provides some benefits in that we can run the west command tests on
multiple python versions and host OSes (linux, mac and windows).

Also have the benefit that the tests are only run on modifications to
files in scripts/west_commands/ or scripts/west-commands.yml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-06 08:34:43 -06:00
Alberto Escolar Piedras 1a01a10a87 ci: Run also BT edtt_ble_test_app tests
Include in the CI run the EDTT tests

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-01-31 18:36:40 +01:00
Alberto Escolar Piedras 9338e9215b run_ci.sh: Set EDTT_PATH
So that the EDTT tool could be used by this script,
set its path so other scripts could find it

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-01-31 18:36:40 +01:00
Anas Nashif d6d0b6454b ci: do not display timestamps
With timestamps enabled, the log in shippable is very difficult to read,
so remove those and enable them when needed for debugging only.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-17 08:30:23 -06:00
Anas Nashif 81b2f37a9d ci: run sanitycheck in verbose mode
Call sanitycheck in verbose mode

Fixes #21483

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-18 12:07:49 -05:00
Anas Nashif 36e1fb630b ci: run sanitycheck on tests and samples
If modules announce they have tests, run sanitycheck on those modules.
This will run on first matrix node and as the last step after running
regular testsuite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-16 18:56:28 +01:00
Alberto Escolar Piedras dfed64c2a4 nrf52_bsim: Use HW models from new west module
Fetch HW models from a new west module.
And, remove all pre-west glue which was used to:
 * Fetch them in CI
 * Validate their vesion
 * Modify the include path and link to them

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-12-11 11:33:02 +01:00
Ulf Magnusson 94d1db03af ci: run_ci: Remove semicolons at ends of lines
Not needed in sh.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson 85625aa27f ci: run_ci: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Anas Nashif 33e6384e48 ci: cleanup test manifests
Make sure we cleanup the manifest files at the right spot of the CI
process. When not building a PR, behavior is different.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-10-11 20:05:03 +02:00
Anas Nashif 2f0be4334b ci: adapt ci script for new sanitycheck
We now run sanitycheck with different options, so adapt script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-10-11 07:28:19 -07:00
Kumar Gala 127a245fb0 ci: run_ci: Refactor west setup into a function
Move west setup into its own function.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 19:13:37 -05:00
Kumar Gala 87c81b7547 ci: run_ci: merge two if blocks
The same if check is done twice back to back, we can merge into a single
if block.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 19:13:37 -05:00
Kumar Gala 020f87eae8 ci: run_ci: Move functions
Move functions up to make the code a bit more readable.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 19:13:37 -05:00
Kumar Gala e717d45ac1 ci: run_ci: handle if the git dir isn't named zephyr
For cases like zephyr-test or for other reasons the repo dir might not
be called zephyr.  Just use the basename of the dir instead of assuming
its called zephyr.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 19:13:37 -05:00
Kumar Gala 3209cad030 ci: run_ci: Remove stale DOC_MATRIX variable
The script doesn't use DOC_MATRIX so remove this stale variable.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 19:13:37 -05:00
Ulf Magnusson c191156454 ci: scripts: Suppress pylint warnings for the sh library
pylint does not like how this library works and generates spurious
warnings like

    scripts/ci/get_modified_tests.py:55:13: E1121: Too many positional
    arguments for function call (too-many-function-args)

    scripts/ci/get_modified_tests.py:57:13: E1123: Unexpected keyword
    argument '_tty_out' in function call (unexpected-keyword-arg)

These warnings are useful enough to want to have enabled in the upcoming
pylint CI check, so suppress them here.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-08 22:22:35 -04:00
Anas Nashif 4132ee3a05 ci: do not export BSIM env vars if bsim is not available
When running run_ci.sh locally with:

 ./scripts/ci/run_ci.sh -l -b master -R upstream/master..

we export BSIM_OUT_PATH unconditionally which causes sanitycheck to fail
on nrf52_bsim (it depends on BSIM_OUT_PATH variable).

Check if the path defined in BSIM_OUT_PATH is available and unset env.
variable if it is not.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-07 09:04:40 -04:00
Marti Bolivar 2b3d9df1d7 west: require v0.6.0 or higher
The main change is the elimination of the bootstrapper, a design flaw
/ misfeature.

Update the documentation to be compatible with the 0.6.x releases as
well. This has to be done atomically, as there were incompatible
changes.  Make use of the versionchanged and versionadded directives
to begin keeping track of how these APIs are evolving.

(Note that west 0.6.0 will remain compatible with the extension
commands in Zephyr v1.14 LTS as long as that is still alive. This
change is targeted towards Zephyr 2.0 users.)

This requires a bump in the shippable container and allows us to
simplify the west_commands test procedure.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
Anas Nashif cbfba62182 ci: increase sleep time between sanitycheck runs
Give the system more time to settle before we try to re-run the tests
again.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-20 22:15:27 +02:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
Anas Nashif b58aa20e13 ci: skip handling coverage data
We not analysing coverage data at all in CI right now. Disable this
while we figure out a better solution for reporting data.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-14 09:26:40 -04:00
Anas Nashif 924987d72f ci: detect changes to sub-board definitions
When detecting changes to boards, make sure we test all board
configurations available in that board directory, not only the main one.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-20 14:14:29 -04:00
Anas Nashif f6a163fc5c ci: remove unused script merge_junit.py
This script is now part of ci-tools repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 10:26:27 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif 193fb971c2 ci: do not report coverage on pull requests
The code coverage reports on pull requests has been inconsistent and
confusing. Disable them for pull-requests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-01 18:39:17 -04:00
Ulf Magnusson a449c98db2 scripts: Fix risky uses of non-raw regex strings in Python scripts
Fixes pylint warnings like this one:

    doc/conf.py:325:0: W1401: Anomalous backslash in string: '\s'.
    String constant might be missing an r prefix.
    (anomalous-backslash-in-string)

The reason for this warning is that backslash escapes are interpreted in
non-raw (non-r-prefixed) strings. For example, '\a' and r'\a' are not
the same string (first one has a single ASCII bell character, second one
has two characters).

It just happens that there's no \s (or \., or \/) escape for example,
and '\s' turns into two characters (as needed for a regex). It's risky
to rely on stuff like that regexes though. Best to make them raw strings
unless they're super trivial.

Also note that '\s' and '\\s' turn into the same string.

Another tip: A literal ' can be put into a string with "blah'blah"
instead of 'blah\'blah'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 14:41:32 -05:00
Ulf Magnusson d5b0bd14e3 scripts: Remove unused imports in all Python scripts
Discovered with pylint3.

Upstream open-amp PR: https://github.com/OpenAMP/open-amp/pull/168

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:06:20 -05:00
Ulf Magnusson 5c8fd84d12 scripts: Remove extra trailing newlines from Python scripts
Fixing all instances so that it can be flagged in a pylint CI check
later.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:53:08 -05:00
Anas Nashif c9d1bb90d8 ci: add option to specify custom range
This is useful when running the script locally on a set of commits to
reproduce how things are run in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 14:08:12 -05:00
Marc Herbert 6b4cda9b25 run_ci.sh: git log what [base] version is being tested
Zephyr Continuous Integration made the choice of rebasing pull requests
on its fast moving master branch before testing them. Unfortunately the
Shippable interface assumes the other choice[*] and highlights the SHA1
of the pull request _before_ rebasing which is very misleading.  For now
the only way to realize this disconnect is to scrutinize the build logs
and/or this source code (or tribal knowledge).

To mitigate and reduce a bit this confusion, run a short:
  git log -n 5 --oneline --decorate
before and after rebase.

Making it worse, Shippable sub-runs are not pegged to a common base
version. For instance the reason why shippable sub-run 35578.1 passed
while all other 35578.x sub runs failed is very likely because PR #13803
was merged to master in the mean time. This commit would have been able
to prove that.

[*] In an ideal world with infinite time and resources, Continuous
Integration would test pull requests BOTH alone and combined with the
moving tip.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-03-01 09:39:31 +01:00
Marc Herbert f7e995c075 run_ci.sh: run pytest-3 if found
On (at least) Fedora "pytest" is python2 and python2 only.

Also update remote name in sample invocation from "upstream" to "origin"
because that's how west sets things up by default (and this script
requires west)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-03-01 09:39:31 +01:00
Anas Nashif 062d05645b ci: tests: do not build all tests when docs/images change
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>
2019-02-09 17:22:08 -06:00
Anas Nashif 115b811016 ci: do not build all tests when docs/images change
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>
2019-02-09 17:22:08 -06:00
Anas Nashif 12f737163f ci: run_ci.sh: make script run locally
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>
2019-02-01 19:04:55 -05:00
Anas Nashif 8a51a4bf26 ci: do not abort if west is already initialised
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>
2019-02-01 19:04:55 -05:00
Marti Bolivar 63841df184 scripts: run_ci.sh: add pytest-based testing for west commands
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>
2019-01-29 10:15:01 +01:00
Marti Bolivar 9cecb5df4a scripts: run_ci.sh: remove dead code
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>
2019-01-29 10:15:01 +01:00
Carles Cufi 6aa87b6f5b ci: Update to the new west model
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>
2019-01-29 10:15:01 +01:00
Anas Nashif ca51ac916c ci: Use west to clone zephyr
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>
2019-01-29 10:15:01 +01:00
Anas Nashif eecd90f1d8 ci: remove check-compliance script
This is now maintained outside of the tree in ci-scripts repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 09:49:56 -05:00
Carles Cufi d9b8b02519 scripts: ci: check-compliance: Fix running out-of-tree
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>
2018-12-14 13:11:24 +01:00
Alberto Escolar Piedras d8c25d37d9 ci: Allow setting BSIM_OUT_PATH from environment
If BSIM_OUT_PATH was set in the environment use that value

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-12-07 16:46:54 -05:00
Alberto Escolar Piedras 69772ef7d8 ci: Fail shippable if something fails catastrophically
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>
2018-12-07 16:46:54 -05:00
Alberto Escolar Piedras 539e73f526 ci: Copy results before handling coverage
Coverage parsing has high chances of failing, let's copy
first the results

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-12-07 16:46:54 -05:00
Anas Nashif c562e4247d ci: remove bsim result options
This option is not being used anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-06 14:24:41 -05:00
Anas Nashif c3e98056ea ci: set second pass options correctly
Use correct 3rd pass env variable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-06 14:24:41 -05:00
Anas Nashif 3a361ecdc7 ci: do not build btsim if not installed
Do not attempt to build btsim if software is not installed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 19:28:01 -05:00
Anas Nashif e81c902488 ci: PULL_REQUEST is reserved, use something else
Use PULL_REQUEST_NR instead of PULL_REQUEST which is reserved by
shippable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 18:45:26 -05:00
Anas Nashif d1bca4e056 ci: use set -x for verbosity
set -v was too verbose, so change to -x and remove extra sourcing of
zephyr-env.sh.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif 45cbc81160 ci: pass pull request number to CI script
For further processing, pass pull request number to the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif d95ce03c1d ci: define BSIM_* variables in ci script directly
Rather than pass them as options, just set it directly in the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif a0a1bffd1c ci: move pos processing to the CI script
Move post processing to script and remove duplicatated code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Alberto Escolar Piedras 2d580a8339 ci: Add missing option to control placement of BT tests results file
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>
2018-11-21 09:42:46 -05:00
Anas Nashif 53982b7e27 Revert "ci: do not build btsim if we are not going to run it"
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>
2018-11-21 09:12:21 -05:00
Anas Nashif 88ece4944b ci: do not build docs in main CI job
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>
2018-11-21 09:12:21 -05:00
Anas Nashif ccb57d766b ci: fix skipped testcase status posting
Skipped tests were not evaluated correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-20 18:14:19 -05:00
Anas Nashif 4c0e3e8697 ci: overhaul check-compliance.py script
- 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>
2018-11-20 16:36:10 -05:00
Anas Nashif 6d5ac1c089 ci: do not build btsim if we are not going to run it
We were building this on every node.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-20 16:36:10 -05:00
Alberto Escolar Piedras 917711fd8a ci: Run bsim_bt tests and collect coverage results
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>
2018-11-13 11:14:19 -05:00
Anas Nashif 043b0a6a28 ci: build docs on last node
Distribute the load and build docs correctly on the last node.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-11 08:34:12 -05:00
Anas Nashif 0a63947abc ci: move ci scripting from .shippable to a script
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>
2018-11-10 13:09:00 -05:00
Anas Nashif 399281beb8 scripts: remove unused ci scripts
Remove old and unused scripts from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-10 13:09:00 -05:00
Carles Cufi 5f102fbfca scripts: ci: Set SOC_DIR for check-compliance.py
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>
2018-09-14 17:45:56 +02:00
Ulf Magnusson d0e8752a52 Kconfig: Rename $ENV_VAR_{ARCH,BOARD_DIR} to $ARCH/$BOARD_DIR
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>
2018-09-11 19:17:25 -04:00
Ulf Magnusson 4fe581ccc8 check-compliance: Fix undef. Kconfig symbol check for external projects
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>
2018-08-18 10:38:52 +02:00
Ulf Magnusson f24d4bb369 check-compliance: Simplify undefined Kconfig symbol check
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>
2018-08-13 19:31:46 -07:00
Ulf Magnusson 90e8d67848 check-compliance: Fix list_undef_kconfig_refs.py for external projects
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>
2018-06-27 19:14:22 +02:00
Ulf Magnusson d317a0e6b4 kconfiglib: Update to use redesigned 'referenced' API
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>
2018-06-25 10:31:08 +02:00
Ulf Magnusson 5bfc7ff275 kconfig: Fail in CI if Kconfig files reference undefined symbols
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>
2018-06-18 11:25:35 +02:00
Carles Cufi a06b14f29b scripts: check-compliance: Allow to run from any path
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>
2018-05-24 16:57:24 -04:00
Anas Nashif f48dda0f0f ci: verify author identity
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>
2017-11-24 10:21:53 -05:00
Anas Nashif f35002c04d ci: fix encoding of documentation warning file
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>
2017-10-20 15:53:17 -04:00
Anas Nashif 7bd98a09d5 ci: compliance: decode output to utf8
Fixes GH-1580.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-12 08:47:14 -04:00
Anas Nashif 541f791fad ci: compliance script should use python3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 19:01:58 -04:00
Anas Nashif c1cafb1f50 ci: run more tests on boards that have changed
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>
2017-08-14 13:28:42 -04:00
Anas Nashif 31df3b27cc tests: run modified tests with full coverage
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>
2017-07-28 17:03:04 -04:00
Anas Nashif 2f117af6c5 scripts: make check_compliance scripts take arguments
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-10 10:44:33 -04:00
Anas Nashif 1fc69dd4db ci: merge xml reports into one single file
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-10 10:44:33 -04:00
Anas Nashif c363a0d000 ci: compliance: add missing classname and enhanced description
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-10 10:44:33 -04:00
Anas Nashif a1c74b74d2 ci: update path to theme repo
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-03 15:36:03 -04:00
Anas Nashif ed6eba7f4f CI: show commit range in log
Also print range in the test report.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-03 12:27:10 -05:00
Anas Nashif 3a212f8875 ci: add documntation checking and posting to AWS S3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-30 11:40:26 -04:00
Anas Nashif acedb70a94 ci: add CI/CD integration and related scripts
Add initial .shippable.yml for CI integration on github and related
scripts.

Change-Id: I095d125e780bba980e635e218205c8741e753a8e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-27 20:58:14 -04:00