* Try to fix ASAN behavior
* improve alignments
* fix buffer overflow and various other fixes
* minor fixes
* formatting
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
* test(txt): Add test for identifying empty text when trying to get next line
* test(txt): Rename next line empty string handling test
* test(txt): Add tests for _lv_txt_is_cmd
* test(txt): Add initial tests for _lv_txt_ins
* fix(txt): Check for NULL before using strlen
Passing NULL to strlen is not defined, so we should avoid it
* txt: Update docs
Remove docs from source file and add comment about pointers to NULL terminated arrays where necessary
* txt: Misc update in encoded_size
* test(txt): first tests for _lv_txt_cut
* tests: Remove -Wmissing-prototype flag from compilation
This will allow us to have cleaner test cases files.
* test(txt): Remove test (funtion) prototypes as they're no longer necessary
* Update src/misc/lv_txt.h
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
* Update src/misc/lv_txt.h
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
* Revert "tests: Remove -Wmissing-prototype flag from compilation"
This reverts commit 8b3217de8d9210eb2e6da5e94c0735beb2735be7.
* test(txt): Use pragma to disable missing-prototype warning
* test: use extended set of compile options for test cases
* Revert "test(txt): Use pragma to disable missing-prototype warning"
This reverts commit 64909e30ed124ca1e8ca390ca0639479c3e34f44.
* test(txt): Add assert to test_txt_cut_len_longer_than_string test
* test(txt): Add test for _lv_txt_encoded_next on valid ascii input
* test(txt): Add tests for _lv_txt_encoded_next with 2 byte long inputs
* test(txt): Add tests for _lv_txt_encoded_next with 3 byte long inputs
* test(txt): Add tests for _lv_txt_encoded_next with 4 byte long inputs
* cleanup(txt): Add helper macros to identify ASCII and UTF8 codes
* cleanup(txt): Add missing LV_ prefix to helper macros
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
Create one GitHub workflow job for each build option build
or test execution. This allows each of the five builds to
be executed in parallel as well as making it easier to
navigate to the test output as it now resides in its own
job.
This change **does** change the command-line arguments to
the test execution script. This is required to allow the
build options name to be passed in.
New `tests/main.py` command-line help:
```
usage: main.py [-h] [--build-options BUILD_OPTIONS] [--clean]
[--report]
[{build,test} [{build,test} ...]]
Build and/or run LVGL tests.
positional arguments:
{build,test} build: compile build tests, test:
compile/run executable tests.
optional arguments:
-h, --help show this help message and exit
--build-options BUILD_OPTIONS
the build option name to build or run.
When omitted all build configurations
are used.
--clean clean existing build artifacts before
operation.
--report generate code coverage report for
tests.
This program builds and optionally runs the LVGL test programs.
There are two types of LVGL tests: "build", and "test". The
build-only tests, as their name suggests, only verify that the
program successfully compiles and links (with various build
options). There are also a set of tests that execute to verify
correct LVGL library behavior.
```
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>