1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/compile_and_test_for_board
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
..
tests compile_and_test_for_boards: Add no-compile flag 2023-07-18 12:22:36 +02:00
.gitignore tools/compile_test_one_board: add tox.ini configuration file 2019-01-23 18:23:04 +01:00
compile_and_test_for_board.py compile_and_test_for_boards: Add no-compile flag 2023-07-18 12:22:36 +02:00
README.md tools/compile_test_one_board: update documentation README 2019-01-23 18:23:05 +01:00
setup.cfg setup.cfg: remove bad option 2022-06-02 11:42:53 +02:00
tox.ini tools/compile_and_test_for_board: add black testenv in tox 2021-10-22 10:19:55 +02:00

Compile and Test one board

The ./compile_and_test_for_board.py script can be used to run all compilation and automated tests for one board, not the manual tests.

Usage

./compile_and_test_for_board.py path_to_riot_directory board_name [results]

It prints the summary with results files relative to results_dir/board to have a github friendly output.

Failures and all tests output are saved in files. They can be checked with:

find results/ -name '*.failed'
find results/ -name 'test.success'

Script checks

Use tox to run basic checks on the script:

$ tox

This runs doctest (via pytest), pylint and flake8 checks in a row. Use -e to run each check independently:

$ tox -e test
$ tox -e lint
$ tox -e flake8

Implementation TODO

The script was developed for being used outside of RIOT so does not currently simply adapt to be used from within RIOT.

  • Provide another script for new interface?
  • Provide a RIOT/Makefile integration
  • Save output files into ${BUILD_DIR}/output/compile_and_test directory by default
  • Add tests.
  • Implement the board_is_supported/board_has_enough_memory/has_tests to make targets instead of fiddling to get the value