Simplifies `tests/main.py` as it no longer needs to invoke
tests individually or keep track of and report their pass/fail
status.
Also enables the ability to run tests in parallel, support timeouts,
and re-run flaky tests.
https://cmake.org/cmake/help/latest/manual/ctest.1.html
* Convert tests/Makefile to a cmake project file.
This change switches the building of LVGL tests to use cmake
which is more portable than make. Additionally, whenever
cmake can be used, instead of the Python script (`main.py`),
the former is preferred.
The interface to `main.py` is unchanged, and tests are built
and executated the same as before.
This closes https://github.com/lvgl/lvgl/issues/2474.
* Installing `gcovr` in GitHub workflow.
* Documented steps to install libpng-dev.
* Added missing stdout flush when running tests.
* Grammar tweak in README.
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
* Refactor unit test scripts.
Does the following:
1. Remove as many dependencies on the operating system shell as possible.
For example, use of shutil.rmtree(...) instead of os.system('rm -r ...').
This brings this script a bit closer to being able to run on Windows.
2. Switch from os.system() to subprocess.check_call().
* This is a bit more secure as check_call() directly invokes the subprocess
without evaluation the arguments on a command-line.
* Removes the need to evaluate the return code as check_call() does this.
* Can directly set environment variables (e.g. env=cmd_env) instead of
including with subprocess invocation (e.g. BIN=test.bin).
3. Minor cleanup to main.py sys.argv parsing.
4. PEP8 formatting.
* Ignore FileNotFoundError for rmtree('report').
* Back to os.system for gcovr.
* Removed unused shutil import.