1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

30 Commits

Author SHA1 Message Date
MrKevinWeiss
ceec795ae5
compile_and_test_for_board: Add only-if-changed feature
This will use the make test-input-hash-changed feature to save
the test hashes with the results and optionally skip running
the test if nothing has changed.

Murdock already has this feature but it is not easily accessible.

This should prevent unneeded flash cycles as well as speeding up
constant rerunning of tests for boards.
2024-02-01 13:50:00 +01:00
MrKevinWeiss
d12d5925de
compile_and_test_for_boards: Add no-compile flag
Since we have a no-test flag that prevents executing tests, I think
a no-compile flag is a nice compliment. Why? Well if I want to use
this script for running multiple boards at the same time, RIOT is
not so great handling parallel compile steps with conflicts on
lockfiles happening, mostly due to packages. With this I can
compile a list of boards sequentially, then flash and run tests
in parallel, skipping the compile step.
2023-07-18 12:22:36 +02:00
Francisco Molina
69e4747ecc setup.cfg: remove bad option 2022-06-02 11:42:53 +02:00
Francisco Molina
fabcdf88a4 dist/tools/compile_and_test_for_board: fix lint 2022-06-02 11:42:53 +02:00
8f870a7cb8
tools/compile_and_test_for_board: reformat with black 2021-10-22 10:19:55 +02:00
c98fc635fc
tools/compile_and_test_for_board: add black testenv in tox
Add Flake8 and Pylint configuration compatible with black
2021-10-22 10:19:55 +02:00
Martine Lenders
5204c29890
dist/tools/compile_and_test_for_board: use f-strings where possible 2021-09-17 12:04:04 +02:00
Francisco Molina
5d47e186ed dist/toles/compile_and_test_for_board: fix W1514 2021-08-23 16:44:23 +02:00
dd88ead843
tools/compile_and_test_for_board: fix lint
Pylint raises an error because of inconsistent return statements in the make_with_outfile function. The return value of this function is never used, so a bare return or no return is ok
2021-02-21 21:34:03 +01:00
Martine S. Lenders
4cc6963b12
compile_and_test_for_board.py: add optional JUnit XML support 2020-08-27 14:25:57 +02:00
Martine S. Lenders
da3fdd33d1
tools: add capability to provide make command via environment
Not all operating systems name the GNU Make `make`. FreeBSD e.g. uses a
different dialect of Make, that seems to be incompatible with GNU make.
(I wasn't able to get `make` run, but `gmake` works).

This allows our test scripts to be configured via the environment
variable `MAKE` to point to a different make command.
2020-07-08 09:36:36 +02:00
Francisco Molina
413f401b97 dist/tools/compile_and_test_for_board: pass parser as main arg 2020-01-08 08:32:42 +01:00
ac33697af7
tools/compile_test_board: allow use of wildcards for applications 2019-12-19 15:58:47 +01:00
Gaëtan Harter
7f2f0b6616
tools/compile_and_test_for_board: allow setting the flash targets
This allow configuring the flash targets in the same way as the
compilation and test targets.

This is part of trying to flash with docker using a different flash target.
2019-10-10 11:39:00 +02:00
Gaëtan Harter
25890c814a
compile_and_test_for_board: add --with-test-only
Add an option to only compile applications that have available test.

The target usage is when running hardware tests to save time by only
compiling what will be tested.
2019-08-02 14:35:05 +02:00
Gaëtan Harter
821c42f5b2
compile_and_test_for_board: add logger info for 'has_test'
Add a logger info printing if the application has a test.
2019-08-02 13:24:52 +02:00
Gaëtan Harter
5bb49b673c
Merge pull request #11517 from cladmi/pr/compile_and_test_for_board/do_not_check_git
tools/compile_and_test_for_board: ignore git tracked or not
2019-05-13 19:43:02 +02:00
Gaëtan Harter
89e5c67f28
tools/compile_and_test_for_board: ignore git tracked or not
Remove the check that directory are git tracked or not.
This should not be done by the script and was a mistake.

If need be to be checked it should be moved to RIOT 'info-applications'
and running tests should be done in a clean environment anyway.
2019-05-13 16:38:41 +02:00
Gaëtan Harter
16f07e571e
tools/compile_and_test_for_board: assert resultdir is valid
Currently giving an absolute or outside of RIOT application breaks the
result directory evaluation which can lead to deleting the application.

Add an assertion to detect it.
2019-05-13 15:47:44 +02:00
Gaëtan Harter
db3847f107
tools/compile_and_test_for_board: add is_in_directory function
Add function testing if a path is inside a directory.
2019-05-13 15:38:27 +02:00
Gaëtan Harter
87a1d08602
compile_and_test_for_board: use 'test/available' to detect test
Use the new 'test/available' target to detect if there are tests.
This prevents issues where calling make would print unrelated debug
messages that would be taken as an output.

The targets executed to check if there are tests can be set with
'--test-available-targets'.
2019-03-26 14:12:25 +01:00
Gaëtan Harter
a1d47cae21
tests/compile_and_test_for_board: remove duplicate 'default' in help
Default values are given by ArgumentDefaultsHelpFormatter so no need to
duplicate 'default' value in manually anymore.
2019-03-06 14:47:45 +01:00
Gaëtan Harter
8c15d97629
tools/compile_and_test_for_board: add tests for help message
Verify that the help message matches what is in the docstring.
2019-02-28 13:45:40 +01:00
Gaëtan Harter
998211d738
tools/compile_and_test_for_board: add tests directory
Tests in `tests` will be used by 'tox'.
2019-02-28 13:45:40 +01:00
Gaëtan Harter
94aeb5a223
tools/compile_and_test_for_board: FIX outdated help docstring
Update the help message in the docstring.
It should reflect the content of `--help`.

I replaced the manual line wrapping by disabling the warning on the
docstring.
2019-02-28 13:45:40 +01:00
613e05fd42
tools/compile_test_one_board: update documentation README
Provide some notes on how to perform basic checks on the script using tox
2019-01-23 18:23:05 +01:00
148f715689
tools/compile_test_one_board: add tox.ini configuration file
tox.ini configures 3 checks on the python script: doctest (via pytest), pylint and flake8
2019-01-23 18:23:04 +01:00
26a64694dd
tools/compile_test_one_board: rename TestError exception class
Otherwise it conflicts with pytest automatic parsing which tries to execute all classes with name beginning with Test
2019-01-23 16:25:31 +01:00
Gaëtan Harter
204a4bae7f
dist/tools/compile_and_test_for_board: add some TODO
The script was migrated as is from Release-Specs but could benefit from
adaptation as it is run from RIOT.
2019-01-18 16:08:55 +01:00
Gaëtan Harter
ae76d7f364
dist/tools/compile_and_test_for_board: add compile and test script
Move the compile and test script from Release-Specs.
https://github.com/RIOT-OS/Release-Specs/blob/271dc8/02-tests/compile_and_test_for_board.py

By default it should be run as

    ./compile_and_test_for_board.py path_to_riot_directory board_name [results]

The script is migrated as-is so has not been changed to automatically use the
current repository.
2019-01-18 16:08:31 +01:00