Commit Graph

274 Commits

Author SHA1 Message Date
Gabor Kiss-Vamosi
5369d7d473
arch(conf, api) refactor lv_conf and some API (#3501)
Kconfig and MicroPython config is not updated yet.


* start to refactor lv_conf.h

* further mem refactoring

* create lv_mem_builtin.c/h

* update lv_conf_internal.h

* add lv_strlen and lv_strncpy

* rename LV_DRAW_COMPLEX to LV_USE_DRAW_MASK

* update lv_conf_template

* minor fix
2022-07-19 13:31:42 +02:00
Xiang Xiao
dc1e4c87b0
fix(format): check more source code (#3493)
and sync .pre-commit-config.yaml with scripts/code-format.py

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 15:28:16 +02:00
jadonmmiller
a06e11478e
fix(arc): fix bug with LV_ARC_MODE_REVERSE (#3417) (#3418) 2022-07-04 13:06:26 +02:00
embeddedt
9a48de0f8b
feat(style) add 'inherit' and 'initial' CSS properties (#3390)
Fixes #3086
2022-06-09 20:20:34 -04:00
embeddedt
2148ed99b0
fix(mem): fix TLSF returning the wrong pointer when the requested size is too large (#3325)
* test(mem) add test for #3324

* fix(tlsf) don't return the same pointer if the requested size is too large
2022-05-14 22:04:13 +02:00
embeddedt
85e3e23878
ci bump test timeout to 30 seconds [skip ci]
The ARM runners are a lot slower.
2022-05-09 13:40:48 -04:00
embeddedt
bae6bc08e0
Revert "test(mem) add test for #3324"
This reverts commit 97006647d8.
2022-05-09 13:27:05 -04:00
embeddedt
97006647d8
test(mem) add test for #3324 2022-05-04 09:19:00 -04:00
embeddedt
b83c5aa9bc
ci make sure LVGL assertions cause tests to fail 2022-05-04 09:15:30 -04:00
embeddedt
003f18f86c
ci limit tests to 15 seconds 2022-05-04 09:08:04 -04:00
embeddedt
ea79cee01a
ci add Makefile test 2022-04-29 19:38:04 -04:00
Gabor Kiss-Vamosi
8481e3a33b ci(switch): fix mem leak test 2022-04-21 21:18:40 +02:00
Gabor Kiss-Vamosi
98660a861d fix(fs): fix cached read and add unit test for lv_fs
fixes: #3262
2022-04-21 20:45:33 +02:00
Gabor Kiss-Vamosi
1b219654db chore: code formatting and fix warnings 2022-04-06 22:18:30 +02:00
Carlos Diaz
2b6cc3bc9c
ci(slider): add unit test (#3198)
* slider: Refactor LV_SLIDER_KNOB_COORD and draw_knob

The `hor` parameter of this macro was always true, ending up always using the
left side of the ternary operator, with this refactor we eliminate the `hor`
parameter and remove the ternary operator it was used for.

This macro is only used in the `draw_knob` event handler, so it helps with its
initial cleanup.

* test(slider): Test documented default properties

* test(slider): Tests for LV_EVENT_KEY with valid and invalid keys

* feat(slider): Add helper to know if slider is horizontal

* chore(slider): Cleanup LV_EVENT_PRESSING handler

Reduce scope of variables where possible and use LV_CLAMP

* chore(slider): Cleanup draw_knob

* test(slider): Add tests for LV_EVENT_RELEASED

* test(slider): Add note about left_knob_focus

* test(slider): Initial test for hit test

* test(slider): Add tests for different slider modes

* chore(slider): cleanup draw_knob

* chore(slider): Cleanup position_knob

* test(slider): Move group configuration to setUp

* test(slider): Refactor tests with feedback

* add test_ranged_mode_adjust_with_encoder

* code formatting

* tests(slider): Remove direct usages of left_knob_focus

* test(slider): Remove unused variable

* Revert "test(slider): Refactor tests with feedback"

This reverts commit b274f829ec.

* test(slider): Add missing variable

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-03-23 13:05:30 +01:00
Xiang Xiao
4c4f954059
chore(style): remove the trailing space from all source files (#3188)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 11:25:51 +01:00
guoweilkd
7713327d61
feat(font): add imgfont - can be used to add emojis to label/span (#3160)
* feature(font): draw img in label/span

* add to tests

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-03-17 10:18:14 +01:00
Carlos Diaz
688421bc10
chore(tests_indev): Add comments to encoder helper (#3155) 2022-03-10 10:53:56 +01:00
embeddedt
8ac93ad883
refactor(style) move flag information into a dedicated table (#3102) 2022-03-07 10:01:25 -05:00
Carlos Diaz
406386dc3f
test(line): add unit tests for line widget (#3104)
* test(line): Test y invert field

* test(line): Validate documented default values

* test(line): Assert line is not clickable after construction

* test(line): Test line size calculation

* chore(line): Refactor LV_EVENT_GET_SELF_SIZE handling

Return early when no point_array is set or point_num is 0

* chore(line): Cleanup LV_EVENT_DRAW_MAIN handling

Reduce scope of point variables

* test(line): Clean screen on tearDown

* test(line): Add initial test for extra draw size calculation

* test(line): Fix extra draw size test
2022-02-25 19:58:43 +01:00
Carlos Diaz
e25fa427d1
test(table): replicate issue when reducing table cells (#3121)
* test(table): Replicate issue when reducing table cells

See #3120 for report

* test(table): Cell reduction test without use after free

Set the row count to 1 to be able to have a passing test, now we can track
down the real bug, which is triggered when having more than 1 row in the table.

* test(table): Add failing test for cell reduction

This test currently triggers the use after free bug

* chore(table): No-op when new and current row and columns counts are equal

* chore(table): Clean up lv_table_set_col_cnt

* chore(table): Add comments to get_row_height

* chore(table): Minor format cleanup and comment of cell_data layout

* fix ASAN arror

* minor fixes

* chore(table): Restore comments to get_row_height

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-24 19:14:33 +01:00
Carlos Diaz
ab727d3181
test(textarea): add unit test (#3074)
* test(textarea): Password mode

* test(textarea): label style with one line enabled

* test(textarea): Cursor click pos

* chore(textarea): Move auto hide to helper

* test(textarea): Placeholder text

* test(textarea): Default properties values

* test(textarea): Remove assert from one line test

* tests(textarea): Remove unused variables

* feat/textarea: Add and use is_valid_but_non_printable_char

* chore/textarea: General cleanup

* test(textarea): Accepted chars

* Update src/widgets/lv_textarea.c

* test(textarea): Assert text is empty after widget creation

* test(textarea): Update test for label style with one line enabled

* test(textarea): Add default text helper and use it

* test(textarea): Ignore line break chars in one line mode

* textarea: Check for line break chars sooner when adding char

* textarea: Start refactor of insert_handler

* textarea: Add comments to insert_handler

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-17 18:12:59 +01:00
Carlos Diaz
cfd6d43672
test(table): add unit tests (#3040)
* test(table): Happy path test for set_cell_value

* table: Abstract char configuration on set_cell_value

Abstract bytes to allocate calculation and txt copying

* table: Add missing &

* table: Update helper names

* test(table): Add test for column increasing when setting a formatted cell value

* table: Increase table columns when needed

* test(table): Fix test_table_should_grow_columns_automatically_when_setting_formatted_cell_value

* table: Fix code formatting

* test(table): Add test for cell ctrl

* table: Refactor draw_main low hanging fruits

* lv_table: Initial refactor of get_row_height

Mostly early breaks on loops and reducing variable scope where possible

* lv_table: Initial refactor of refr_size

Adding const wherever is possible

* lv_table: Further cleanup get_row_height

* lv_table: Cleanup loop in draw_main

* lv_table: Fix -Werror=shadow compilation error

* test(table): Tests for cell ctrl clearance

* lv_table: Rename index to idx

* lv_table: Use helper to know if cell is empty

* test(table): Comment assumptions to column grow test

* test(table): Row height with multi line cell value

* test(table): Wrap on long texts and increase row height

* add rendering test

* fix warnings

* fix out of bounds indexig

* fix rendering test

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-17 13:52:46 +01:00
Gabor Kiss-Vamosi
4246615f48 chore(tests): fix image compare tests 2022-02-16 09:45:39 +01:00
Gabor Kiss-Vamosi
48d87e1ed2 test(img): fix image error diff handler 2022-02-11 16:59:24 +01:00
embeddedt
c6b34bc85b
fix(conf): work around GCC bug (#3082)
Fixes #3078
2022-02-11 15:25:44 +01:00
Mariotaku
e7736f2c32
feat(fragment): add fragment manager (a UI Controller concept) (#2940)
* adding lv_obj_controller

* adding examples for lv_obj_controller

* added some docs

* formatted code

* updated controller docs

* updated controller docs

* updated sample controller field

* changed lv_controller_manager_parent to lv_controller_manager_get_parent

* updated unmanaged controller creation/deletion

* renamed lv_controller_manager_t

* rename: controller -> fragment

* formatted code

* Update examples/others/fragment/lv_example_fragment.h

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update src/extra/others/fragment/lv_fragment.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update src/extra/others/fragment/lv_fragment.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update src/extra/others/fragment/lv_fragment.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* code cleanup

* fragment creation rework

* (wip) fragment manager

* (wip) fragment manager

* refactoring fragment

* lifecycle fixes

* updated fragment event callback

* exposed states of fragment

* added some docs

* updated lv_fragment_managed_states_t name

* updated docs

* updated docs

* updated lv_fragment_manager_dispatch_event docs

* removed msgbox fragment

* updated fragment docs

* updated fragment docs

* updated docs

* updating examples

* fixed example

* reformatted code

* fixed obj_created set timing

* simplified fragment

* improved fragment view del assertion

* fixed a typo

* fixed event_cb check in lv_obj_remove_event_cb_with_user_data

* fixing fragment obj assertion

* regenerated config

* fixed fragment examples

* fixed fragment examples

* added missing examples

* updated docs

* fragment api cleanup

* rename fragment struct names

* added missing param doc

* enabled test for 32bit build

* feat(porting): add a macro lv_run_timer_handler_in_period to simplify porting (#3063)

* feat(porting): add a macro lv_run_timer_handler_in_period to simplify porting

* feat: update helper function and doc

* doc(porting): update function names

* revise to the original os.md

* fix: fix typo

* fix: mitigate warnings

* chore: fix code formatting

* fix(fsdrv): replacing sprintf with lv_snprintf for safety (#3079)

* fix(Kconfig) remove duplicate LV_BUILD_EXAMPLES configuration

* feat(refr) add reset of FPS statistics

* fix(conf) mismatched macro judgment

* feat(fsdrv) replacing sprintf with lv_snprintf for safety

* feat(fsdrv) update stdio and win32

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>

* fix warnings

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: Gabriel Wang <embedded_zhuoran@Hotmail.com>
Co-authored-by: _VIFEXTech <1290176185@qq.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-02-11 12:43:08 +01:00
Carlos Diaz
2c7760c687
chore(test): format test cases (#3071) 2022-02-03 09:59:55 +01:00
Adrian Schnyder
abba1c351a feat(fs): add caching option for lv_fs-read (#2979)
BREAKING CHANGE:
The `LV_FS_...` related configs needs to be updated.

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-01-24 20:52:37 +01:00
embeddedt
4122dda399
ci add 5k stack limit 2022-01-24 14:34:00 -05:00
Themba Dube
8c75bb298a Revert "ci add back stack usage check at 4 kilobytes"
This reverts commit 89135d663d.
2022-01-24 11:01:22 -05:00
Themba Dube
89135d663d ci add back stack usage check at 4 kilobytes 2022-01-24 10:56:11 -05:00
Themba Dube
3bd6ad80e7 test(demo) add tests for widget and stress demos 2022-01-24 10:55:32 -05:00
Themba Dube
1900c21548 ci temporarily disable stack usage check 2022-01-24 10:16:58 -05:00
X-Ryl669
923defd6b6
fix(gradient): general cleanup and fix for alignment issues (#3036)
* 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>
2022-01-24 15:47:47 +01:00
Themba Dube
ba083dfd6d test(style) fix compile error 2022-01-23 12:10:08 -05:00
Themba Dube
da8f34566b test(style) add test for gradient 2022-01-23 12:02:25 -05:00
Themba Dube
51ef9c242c test(event) add test for #2886 2022-01-23 10:07:50 -05:00
Themba Dube
446b1ebf2b test add support for using system heap 2022-01-23 09:58:55 -05:00
Carlos Diaz
0b68840cd9
test(bar): add unit tests (#2845)
* test(bar) Add test for docummented default attributes

* test(bar) Update test for docummented default attributes

* test(bar): Indicator width tracks value

* test(bar) Calculate bar indicator width based on its style

Take padding, max value and bar value into consideraion

* test(bar) Indicator area gets smaller when increasing padding in LV_PART_MAIN style

* test(bar) Start value changes only when in range mode

* docs(bar): Add missing MODE to symbols

* test(bar) Start value should be smaller than current value

* test(bar): Test current value truncation to max and min value

* bar: Check bar mode in lv_bar_set_start_value

bar start_value can be changed only when bar is in LV_BAR_MODE_RANGE mode.
Return early when it's not.

* test(bar): Fix width calculation test

* bar: Initialize indic_area in constructor

* test(bar): Refactor indicator coordinate update test

* test(bar): Indicator negative value in symmetrical mode

* test(bar): Fix base direction

* test(bar): Indicator coord test for RTL base dir
2022-01-22 16:17:13 +01:00
Gabor Kiss-Vamosi
1efe61fda2 chore(test): fix failing tests 2022-01-20 10:33:04 +01:00
ckielstra
febafd1cc7
chore: many trivial spelling and layout fixes (#3008)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-01-17 08:10:23 -05:00
xaowang96
ddae70f741
fix(snapshot) fix memory leak (#2970)
Signed-off-by: wangxuedong <wangxuedong@xiaomi.com>
Co-authored-by: Themba Dube <embeddedthemba@gmail.com>
2022-01-06 08:56:53 -05:00
guoweilkd
8315eb1ca4
feat(txt): add used_width parameter to _lv_txt_get_next_line() (#2898) 2021-12-21 10:37:02 +01:00
Gabor Kiss-Vamosi
cb7fc2bb59 fix(dropdown) be sure the list is the top object on the screen
fixes #2893
2021-12-13 20:26:24 +01:00
Carlos Diaz
559c2cdc9e
test(switch): add initial unit test (#2794)
* test(switch): Add test file and state at creation test

* test(switch): Event handler called only once per click

* test(switch): Add test state change when event bubbling is enabled

* test(switch): Cleanup event bubbling test

* tests(switch): Update memory test and add basic animation test

* test(switch) Add helper to click on switch

* test(switch) Add basic test for knob size calculation

* misc(switch) Replace switch knob rounding error magic number with define

* test(switch) Improve animation test

Properly wait for 50ms after clicking on the switch using lv_test_indev_wait and also assert on switch state after the first and second clicks

* test(switch) cleanup

* misc(switch) Cleanup

* switch: Expose _LV_SWITCH_KNOB_EXT_AREA_CORRECTION value

So we can use it when testing extra draw size
2021-12-07 13:49:26 +01:00
Gabor Kiss-Vamosi
918b3defd7 test(dropdown) fix to pass again 2021-11-23 14:13:24 +01:00
Gabor Kiss-Vamosi
b279f63d6b test(template) simplify _test_template.c
Originally added here 7278089040
but lost somehow
2021-11-11 17:36:12 +01:00
Gabor Kiss-Vamosi
80f0b09e34 test fix LV_USE_LOG_LEVEL -> LV_LOG_LEVEL typo
Related to #2673
2021-10-19 17:40:41 +02:00
Gabor Kiss-Vamosi
e83df6f14d test(arc): add test case for adv_hittest 2021-10-19 17:36:37 +02:00
Carlos Diaz
42989d4e9a
test(txt) initial unit tests and general code cleanup/fixes (#2623)
* 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 8b3217de8d.

* 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 64909e30ed.

* 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>
2021-10-15 11:37:53 +02:00
Gabor Kiss-Vamosi
7a95fa9e2d test add 3rd party libs to all tests and also fix them
Fixes: #2661
2021-10-12 17:03:50 +02:00
Carlos Diaz
3b6a05e253
test add setUp and tearDown to test template (#2648) 2021-10-11 14:22:55 +02:00
Carlos Diaz
acf915b896
test(arc) add initial unit tests (#2617)
* test(arc): Add test for valid creation

* test(arc): Add test for max value truncation

* test(arc): Add test for min value truncation

* test(arc): Add test for value adjustment after updating range

* test(arc): Update test for min value truncation

* test(arc): Add test for angle updating after changing to symmetrical mode

* test(arc): Add test for angle updating after changing to symmetrical mode and value is greater than middle range

* test(arc): Use unity setUp function

* remove API comments from lv_arc.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-10-07 19:01:02 +02:00
Gabor Kiss-Vamosi
18f61c5f77
arch add small 3rd party libs to lvgl (#2569)
* move png, sjpg, bmp, gif, fs_if to extra/libs

* reorganize the examples

* update lv_conf_internal.h

* fix warnings

* add freetype

* remove unused assets

* add the new libs to build tests

* update the docs
2021-10-04 14:34:11 +02:00
Carlos Diaz
bb6829796b
test(checkbox) add initial tests (#2551)
* test(checkbox): Add initial test for checkbox

* test(checkbox): Add test_checkbox_should_have_default_text_when_created

* test(checkbox): Add test_checkbox_should_return_dinamically_allocated_text

* test(checkbox): Add initial tests for static text

Tests are failing tho

* test(arc): Rename bugfix test to arc

Also adds reference to issue in a comment

* test(checkbox): Tests for static text passes

* test(checkbox): Remove test for memory freeing when static text is refreshed

NULL isn't a valid parameter in lv_checkbox_set_text_static
2021-09-20 20:38:47 +02:00
Carlos Diaz
ab50f001a6
feat(tests): Include debug information to test builds (#2568) 2021-09-19 15:23:21 -04:00
Chris Mumford
b1bf7fd29a
test(ci) build and run tests in parallel. (#2515)
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.
```
2021-09-01 11:58:14 +02:00
Chris Mumford
df6cbfe866
ci(tests) run tests using ctest (#2503)
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
2021-08-30 08:45:33 -04:00
Chris Mumford
c11569dc5c
ci(tests) use common script to install development prereqs (#2504)
Simplified workflow and documentation, by moving the
development package prerequisites into a new build script
`scripts/install-prerequisites.sh`.

Also, moved prerequisite installation into its own CI step and
removed explicit working directory change as it is no longer
needed (`main.py` does it).
2021-08-27 18:57:46 -04:00
Chris Mumford
9c846ee493
test convert Makefile to CMake (#2495)
* 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>
2021-08-27 15:49:31 +02:00
Gabor Kiss-Vamosi
9fb98da8a2 test(dropdown) remove dummy test case
relaetd to https://github.com/lvgl/lvgl/issues/2337#issuecomment-905002568
2021-08-26 12:11:29 +02:00
Chris Mumford
53986b4b0e
test Refactor unit test scripts. (#2473)
* 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.
2021-08-25 15:37:59 +02:00
Gabor Kiss-Vamosi
906448ef63 feat(obj) place the scrollbar to the left with RTL base dir.
Related to #2424
2021-08-19 12:51:29 +02:00
Themba Dube
ae15a1bbfe Revert "fix(tests) remove src/test_runners when cleaning"
This reverts commit 6726b0f5df.
2021-08-03 10:25:20 -04:00
Themba Dube
6726b0f5df fix(tests) remove src/test_runners when cleaning 2021-08-03 09:38:13 -04:00
Gabor Kiss-Vamosi
5b3d3dc8b3 perf(draw) reimplement rectangle drawing algorithms
No functionalty has changed only make them more readable and faster.
2021-08-02 15:45:14 +02:00
Gabor Kiss-Vamosi
637b706ddc
perf(draw) reimplement circle drawing algorithms (#2374)
* perf(draw) reimplement circle drawing algorithms

Imporve the speed of circle drawing
Add circle draw caching
Various other speed improvements

* docs describe how to use masks

* fix(draw) add missing GC root usage
2021-07-27 19:16:00 +02:00
Themba Dube
3eacc5923c ci add config for 8bpp 2021-07-15 17:12:25 -04:00
Gabor Kiss-Vamosi
88c485949f feat(event, widgets) improve the paramter of LV_EVENT_DRAW_PART_BEGIN/END
Add lv_<widget>_draw_part_type_t to widgets to precisly describe the hooked drawings.
Also add class_p element to lv_obj_draw_part_dsc_t to show what widgets lv_<widget>_draw_part_type_t needs to be used.

Related to: https://forum.lvgl.io/t/how-to-add-minor-division-lines-to-a-chart/5366/
2021-07-07 16:19:06 +02:00
Themba Dube
4fff99da1d feat(tests) upload coverage to codecov 2021-07-05 13:58:46 -04:00
Gabor Kiss-Vamosi
90438603ad fix(test) do not including anything in test files when not running tests 2021-07-01 21:14:00 +02:00
Gabor Kiss-Vamosi
36b9db38b7 fix tests 2021-06-28 11:13:34 +02:00
Gabor Kiss-Vamosi
449952e3b7 fix tests 2021-06-28 11:08:46 +02:00
Gabor Kiss-Vamosi
c38cae22fb test fix CI build error 2021-06-23 23:04:12 +02:00
Gabor Kiss-Vamosi
61cda59cbe test fix build error 2021-06-23 22:19:51 +02:00
Gabor Kiss-Vamosi
4143b804c8 test(dropdown) add tess for keypad and encoder 2021-06-23 21:51:52 +02:00
Gabor Kiss-Vamosi
e536bb6325 test add keypad and encoder emulators 2021-06-23 21:51:14 +02:00
Gabor Kiss-Vamosi
2ba810b8de tests add mosue emulator 2021-06-23 15:51:30 +02:00
Gabor Kiss-Vamosi
b765643e49 tests add README 2021-06-23 15:51:12 +02:00
Gabor Kiss-Vamosi
3672f87332 test move more source files to src folder 2021-06-23 13:23:47 +02:00
Gabor Kiss-Vamosi
b9b4ba5b26 test cleant up report folder 2021-06-18 14:15:53 +02:00
Gabor Kiss-Vamosi
e35b1d04bd test add build test again, add dropdown test, integrate gcov and gvocr 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
e9e010a846 test add move tests to test_cases and test_runners directories 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
bc5b3be61f test(font_loader) migrate the exisiting font loader test 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
28d2ad4c3a feat(test) add assert for screenshot compare 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
ea8bed34b4 chore(test) improve prints 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
7610d38bb0 fix(test) silence make 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
c12a22ee87 fix(test) add #if guard to exclude test related files from the build 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
c26bcf1cc6 feat(test) first experiement with Unity test engine 2021-06-18 14:13:41 +02:00
Gabor Kiss-Vamosi
8dd33a0041 fix warnings 2021-05-29 07:32:44 +02:00
Gabor Kiss-Vamosi
6aa27cc11b refactor(label, text area) rename functions of text_sel to text_selection 2021-05-13 15:39:06 +02:00
Gabor Kiss-Vamosi
070df61eb2 refactor(color) refactor the palette API 2021-04-23 12:46:14 +02:00
Gabor Kiss-Vamosi
8667402524 minor fixes 2021-04-19 11:21:44 +02:00
Meco Man
a8c21f8e18 fix(style): auto formatted 2021-04-01 01:06:43 +08:00
Gabor Kiss-Vamosi
415c114be6 fix(align) refresh position on size change 2021-03-25 20:53:45 +01:00
Gabor Kiss-Vamosi
53f3cc1827 api(style) remove content style proeprties 2021-03-25 13:36:50 +01:00
Gabor Kiss-Vamosi
666653efe7 fix(refresh): do not redraw the whole object if only part's style changes on a new state 2021-03-19 16:01:26 +01:00
Xiang Xiao
9254a7ea14 fix(comment): remove the space after /* and before */ 2021-03-18 11:51:36 +08:00
Gabor Kiss-Vamosi
87c4a0ffef fix conflicts 2021-03-17 10:24:48 +01:00
Gabor Kiss-Vamosi
dad2b4aab1 fix tests 2021-03-16 20:57:22 +01:00
Xiang Xiao
1f3ae7f274 fix(disp): change all disp_buf to draw_buf
follow up the commit:
commit e9cc1c2d46
Author: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Date:   Wed Mar 10 13:07:15 2021 +0100

    feat(driver): raname lv_disp_buf_t to lv_disp_draw_buf_t + save only the drv's pointer in lv_disp_t
2021-03-14 21:39:05 +08:00
Gabor Kiss-Vamosi
a431569455 feat(fs driver): save only the pointer of the driver in lv_fs_drv_register 2021-03-14 13:42:32 +01:00
Xiang Xiao
7bf547a928
feat(mem): switch the default allocator to tlsf (#2129)
* feat(mem): add initial version of tlsf

from  : https://github.com/mattconte/tlsf
commit: deff9ab509341f264addbd3c8ada533678591905

* feat(mem): switch the default allocator to tlsf

* fix(mem): remove the preserved small buffer

since the builtin allocator(tlsf) is fast enough now

* fix(mem): change LV_MEM_ADD_JUNK to 0

to speed up the normal operation
2021-03-10 15:13:35 +01:00
Gabor Kiss-Vamosi
91a44a465a fix tests 2021-03-10 13:12:45 +01:00
Gabor Kiss-Vamosi
e9cc1c2d46 feat(driver): raname lv_disp_buf_t to lv_disp_draw_buf_t + save only the drv's pointer in lv_disp_t 2021-03-10 13:07:15 +01:00
Xiang Xiao
ffd9c47d3d
fix: remove the tail space after cast expression (#2122)
ensure the style consistency through the code base
2021-03-03 12:02:58 +01:00
Gabor Kiss-Vamosi
fd34dbe056 test with LV_MEM_CUSTOM 1 too 2021-03-01 15:44:43 +01:00
Gabor Kiss-Vamosi
950124f5a0 fix(scroll): varius fixes on lv_obj_scroll_to_view and snapping 2021-02-28 14:18:32 +01:00
Gabor Kiss-Vamosi
87cee2f72b minor fixes 2021-02-26 13:13:37 +01:00
Gabor Kiss-Vamosi
cbfbcb47f9 feat(color): use colors from material design
Use function instead of color macros
2021-02-23 15:03:06 +01:00
Gabor Kiss-Vamosi
9484f1b224 fix warnings 2021-02-19 18:19:47 +01:00
Gabor Kiss-Vamosi
fe20d47b6e fix warnings 2021-02-19 16:16:11 +01:00
Gabor Kiss-Vamosi
5c75c7cc12 fix issues on merging to dev 2021-02-19 15:52:04 +01:00
Gabor Kiss-Vamosi
776165977a merge to dev and slove conflitc 2021-02-19 15:27:44 +01:00
Themba Dube
211a895008 ci(tests) add pedantic to compiler options 2021-02-15 14:44:43 -05:00
Gabor Kiss-Vamosi
02c19eacab fix warnings and make tests working 2021-02-14 22:07:38 +01:00
Gabor Kiss-Vamosi
bb08660cb6 minor fixes 2021-02-14 14:56:34 +01:00
Gabor Kiss-Vamosi
95b1bd8409 add examples + refactoring 2021-02-12 14:22:48 +01:00
Gabor Kiss-Vamosi
1566e6fab1
Update Makefile 2021-02-12 11:02:20 +01:00
Gabor Kiss-Vamosi
5d0a06b6fa add -Wno-error=cast-function-type to build 2021-02-11 15:58:41 +01:00
Xiang Xiao
ced4f2a61f
fix(font): load_glyph calculate the wrong size(one byte short) of last glyph (#2042)
* fix(font): load_glyph calculate the wrong size(one byte short) of last glyph

* Print the banner before running the font test
2021-02-01 12:09:16 +01:00
Gabor Kiss-Vamosi
f84720aa95 merge master 2021-01-23 23:50:00 +01:00
Xiang Xiao
c9b97feea8
fix(formatting): various improvements (#2028)
* fix(formatting): Remove the duplicated space

* fix(formatting): Remove the duplicated 'the'

* fix(spell): run codespell -w for the code base
2021-01-17 09:03:31 -05:00
Xiang Xiao
81b13bf3b6
Remove the double empty lines from all source files (#2009)
* Run dos2unix for all source files

* Remove the trail space from all source files

* Remove the double empty lines from all source files
2021-01-11 14:28:00 +01:00
Gabor Kiss-Vamosi
a42d3942c6 add table and btnmatrix 2021-01-05 13:01:07 +01:00
Gabor Kiss-Vamosi
f0999ccbd4 merge master 2020-12-28 13:08:26 +01:00
Gabor Kiss-Vamosi
9b579f3fad fix(test): use sys/time.h only if built in test mode 2020-12-11 16:42:15 +01:00
Gabor Kiss-Vamosi
fdfb69f066 fi warnigns to make tests run succesfully 2020-11-20 11:55:50 +01:00
Gabor Kiss-Vamosi
0ba7dedeeb fix conflicts 2020-11-20 10:37:11 +01:00
jozba
fc2206105b
Fixed include paths (#1823)
Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>
2020-10-02 13:12:41 +02:00
Gabor Kiss-Vamosi
1067d04c03 fix font laoder supprt LV_FONT_FMT_TXT_LARGE 2020-09-21 11:57:20 +02:00
Gabor Kiss-Vamosi
572974b5e0 update font loader to the new FS API 2020-09-02 10:25:46 +02:00
github-actions[bot]
5d02b27b1f
Merge d4c3567f84 into dev 2020-08-31 12:01:26 +00:00
Gabor Kiss-Vamosi
39bf116e07 fix screenshot testing 2020-08-31 13:58:51 +02:00
Adam Martini
cb5faa64ac
Add update_value private function to lv_arc to prevent set_value return checks in the event of… (#1748)
Add update_value to lv_arc to update the value on range change.
2020-08-27 09:51:11 +02:00
Gabor Kiss-Vamosi
cd9f53c4b4
Merge pull request #1717 from fabiowguerra/feat/dynamic-font-loading
Feat/dynamic font loading
2020-08-13 22:46:23 +02:00
Gabor Kiss-Vamosi
d321e0e4fc fix tests 2020-08-12 14:29:50 +02:00
Fabio Guerra
b3634790cd Implementing missing formats for font loading. 2020-08-12 00:11:02 -03:00
Fabio Guerra
c4e7254aed Some changes to support binary fonts without the kernel table. 2020-08-07 10:56:37 -03:00
Fabio Guerra
f58d97d990 Adding support to dynamic font loading. 2020-08-04 18:59:49 -03:00
Adam Martini
b9d92236e3 Add rotary to build.py defines 2020-06-18 22:25:41 -07:00
Gabor Kiss-Vamosi
279e594d3e minor formatting 2020-05-24 13:14:42 +02:00
Gabor Kiss-Vamosi
a2c973bd5b fix warings 2020-05-24 13:13:07 +02:00
Gabor Kiss-Vamosi
97392f4fdf reduce API size: add underscore prefix to internal functions 2020-05-13 14:11:16 +02:00
Gabor Kiss-Vamosi
a78687ee5d add LV_USE_API_EXTENSION_V6 and LV_USE_IMG_TRANSFORM config options 2020-05-12 21:29:16 +02:00
Gabor Kiss-Vamosi
835ed44029 fix warnings 2020-05-06 20:05:53 +02:00
Gabor Kiss-Vamosi
ffa2970ae5 fixes with LV_COLOR_SCREEN_TRANSP 1 2020-05-01 20:30:28 +02:00
Gabor Kiss-Vamosi
bdc98b4e1f minor fixes 2020-05-01 11:14:10 +02:00
Gabor Kiss-Vamosi
3ac2c390c6 Merge branch 'feat/arabic' into dev-7.0 2020-05-01 09:51:17 +02:00