test(build): cleanup configs and build system (#10416)

This commit is contained in:
André Costa
2026-08-05 14:02:51 +02:00
committed by GitHub
parent 6645af05e1
commit c90e99711d
59 changed files with 1195 additions and 1151 deletions
+14 -15
View File
@@ -20,12 +20,11 @@ jobs:
fail-fast: false
matrix:
# A valid option parameter to the cmake file.
# See BUILD_OPTIONS in tests/CMakeLists.txt.
build_option: ['OPTIONS_NORMAL_8BIT',
'OPTIONS_16BIT',
'OPTIONS_24BIT',
'OPTIONS_FULL_32BIT',
'OPTIONS_SDL']
# See build_only_options and test_options in tests/main.py.
build_option: ['OPTIONS_MINIMAL',
'OPTIONS_LINUX_SW',
'OPTIONS_LINUX_OPENGLES',
'OPTIONS_NUTTX']
name: Build ${{ matrix.build_option }} - Ubuntu
steps:
- uses: actions/checkout@v7
@@ -48,10 +47,9 @@ jobs:
fail-fast: false
matrix:
# A valid option parameter to the cmake file.
# See BUILD_OPTIONS in tests/CMakeLists.txt.
build_option: ['OPTIONS_16BIT',
'OPTIONS_24BIT',
'OPTIONS_FULL_32BIT']
# See build_only_options and test_options in tests/main.py.
build_option: ['OPTIONS_MINIMAL',
'OPTIONS_WINDOWS_SW']
compiler: [gcc, cl]
name: Build ${{ matrix.build_option }} - ${{matrix.compiler }} - Windows
@@ -106,11 +104,12 @@ jobs:
test-native:
runs-on: ubuntu-24.04
strategy:
matrix:
# A valid option parameter to the cmake file.
# See BUILD_OPTIONS in tests/CMakeLists.txt.
build_config: ['64bit build',
'32bit build']
fail-fast: false
matrix:
# A valid option parameter to the cmake file.
# See build_only_options and test_options in tests/main.py.
build_config: ['64bit build',
'32bit build']
name: Run tests with ${{ matrix.build_config }}
steps:
- uses: actions/checkout@v7
+8
View File
@@ -3253,6 +3253,14 @@ config LV_TEST_SCREENSHOT_CREATE_REFERENCE_IMAGE
When a reference image does not exist yet, create it from the rendered
screen instead of failing the compare.
config LV_USE_NANOVG_TEST_HEADLESS
bool "Headless EGL display for NanoVG"
depends on LV_USE_DRAW_NANOVG
help
Render into an off-screen EGL pbuffer instead of a window and read the
pixels back into the LVGL draw buffer, so screenshot compares work the
same way as with the software renderer. Requires EGL and GLESv2.
endif #LV_USE_TEST
config LV_USE_MONKEY
+12 -1
View File
@@ -139,6 +139,16 @@ set(LV_BUILD_DEFCONFIG_PATH path/to/my_defconfig)
add_subdirectory(lvgl)
```
Several defconfigs can be given as a `;`-separated list. They are merged in the
given order, so a later one overrides a value set by an earlier one. This lets
related configurations share a common base instead of duplicating it:
```cmake
set(LV_BUILD_USE_KCONFIG ON)
set(LV_BUILD_DEFCONFIG_PATH "configs/base.defconfig;configs/my_board.defconfig")
add_subdirectory(lvgl)
```
To enable the demos and examples set these options:
```cmake
@@ -205,7 +215,8 @@ Below is a list of the available options/variables
| LV_BUILD_CONF_DIR | PATH | Allows to set a directory containing `lv_conf.h` |
| LV_BUILD_USE_KCONFIG | BOOLEAN | When set KConfig is used as the configuration source. This option is disabled by default. |
| LV_BUILD_DOTCONFIG_PATH | PATH | Specify the path to a .config file when using Kconfig |
| LV_BUILD_DEFCONFIG_PATH | PATH | Specify the path to a defconfig file when using Kconfig |
| LV_BUILD_DEFCONFIG_PATH | STRING | Specify to use a .defconfig file instead of the current .config in a Kconfig setup. Accepts a `;`-separated list of defconfigs, which are merged in the given order so that a later one overrides a value set by an earlier one. |
| LV_BUILD_DEFCONFIG_STRICT | BOOLEAN | When enabled, a defconfig that assigns an unknown or non-user-configurable symbol, or a value that ends up having no effect, fails the build instead of being ignored. This option is disabled by default. |
| LV_BUILD_KCONFIG_ROOT | PATH | Override the root Kconfig file that is parsed by LVGL's build system (defaults to LVGL's Kconfig file) |
| LV_BUILD_LVGL_H_SYSTEM_INCLUDE | BOOLEAN | Enable if LVGL will be installed to the system or your build system uses a sysroot. Turning this option on implies that the resources generated by the image generation script will include `lvgl.h` as a system include. i.e: `#include <lvgl.h>`. This option is disabled by default. |
| LV_BUILD_LVGL_H_SIMPLE_INCLUDE | BOOLEAN | When enabled the resources will include `lvgl.h` as a simple include, this option is enabled by default. |
+13
View File
@@ -192,6 +192,19 @@ cmake -B build -DLV_BUILD_USE_KCONFIG=ON -DLV_BUILD_DEFCONFIG_PATH=configs/defco
cmake --build build
```
### Combining presets
`LV_BUILD_DEFCONFIG_PATH` accepts a `;`-separated list of defconfigs. They are
merged in the given order, so a later one overrides a value set by an earlier
one. This way a set of related configurations can share a common base instead of
each repeating it:
```bash
cmake -B build -DLV_BUILD_USE_KCONFIG=ON \
"-DLV_BUILD_DEFCONFIG_PATH=configs/defconfigs/sdl2.defconfig;my_overrides.defconfig"
cmake --build build
```
### Empty configuration
`configs/defconfigs/empty.defconfig` strips LVGL to its smallest sensible
+11
View File
@@ -54,6 +54,17 @@ if(CONFIG_LV_USE_GLFW)
include(${CMAKE_CURRENT_LIST_DIR}/dependencies/glfw.cmake)
endif()
# LV_USE_EGL dynamically loads egl so it doesn't appear here
if(CONFIG_LV_USE_NANOVG_TEST_HEADLESS)
include(${CMAKE_CURRENT_LIST_DIR}/dependencies/egl.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/dependencies/glesv2.cmake)
endif()
# ====== OS ====== #
if(CONFIG_LV_USE_NUTTX_LIBUV)
include(${CMAKE_CURRENT_LIST_DIR}/dependencies/libuv.cmake)
endif()
# ====== Indev ====== #
if(CONFIG_LV_USE_WAYLAND OR CONFIG_LV_USE_LIBINPUT)
include(${CMAKE_CURRENT_LIST_DIR}/dependencies/xkbcommon.cmake)
+45
View File
@@ -0,0 +1,45 @@
# ============================================================
# EGL Configuration
# ============================================================
set(PKG_CONFIG_NAME "egl")
set(PKG_LIB_PRIVATE "-lEGL")
option(LV_USE_FIND_PACKAGE_EGL "Resolve EGL via find_package"
${LV_USE_FIND_PACKAGE})
option(LV_USE_PKG_CONFIG_EGL "Resolve EGL via pkg-config" ${LV_USE_PKG_CONFIG})
if(LV_USE_FIND_PACKAGE_EGL)
find_package(OpenGL QUIET COMPONENTS EGL)
if(TARGET OpenGL::EGL)
message(STATUS "lvgl: EGL: found via find_package")
lvgl_link_packages(
PRIVATE
TARGETS
OpenGL::EGL
CMAKE_PACKAGE
OpenGL
PKG_CONFIG
${PKG_CONFIG_NAME}
PKG_LIB_PRIVATE
${PKG_LIB_PRIVATE})
return()
endif()
endif()
if(LV_USE_PKG_CONFIG_EGL AND PkgConfig_FOUND)
pkg_check_modules(EGL IMPORTED_TARGET QUIET ${PKG_CONFIG_NAME})
if(EGL_FOUND)
message(STATUS "lvgl: EGL: found via pkg-config")
lvgl_link_pkg_config(
PRIVATE
TARGETS
PkgConfig::EGL
PKG_CONFIG
${PKG_CONFIG_NAME}
PKG_LIB_PRIVATE
${PKG_LIB_PRIVATE})
return()
endif()
endif()
message(FATAL_ERROR "lvgl: EGL not found. Please install libegl")
@@ -0,0 +1,46 @@
# ============================================================
# OpenGL ES v2 Configuration
# ============================================================
set(PKG_CONFIG_NAME "glesv2")
set(PKG_LIB_PRIVATE "-lGLESv2")
option(LV_USE_FIND_PACKAGE_GLESV2 "Resolve OpenGL ES via find_package"
${LV_USE_FIND_PACKAGE})
option(LV_USE_PKG_CONFIG_GLESV2 "Resolve OpenGL ES via pkg-config"
${LV_USE_PKG_CONFIG})
if(LV_USE_FIND_PACKAGE_GLESV2)
find_package(OpenGL QUIET COMPONENTS GLES2)
if(TARGET OpenGL::GLES2)
message(STATUS "lvgl: OpenGL ES: found via find_package")
lvgl_link_packages(
PRIVATE
TARGETS
OpenGL::GLES2
CMAKE_PACKAGE
OpenGL
PKG_CONFIG
${PKG_CONFIG_NAME}
PKG_LIB_PRIVATE
${PKG_LIB_PRIVATE})
return()
endif()
endif()
if(LV_USE_PKG_CONFIG_GLESV2 AND PkgConfig_FOUND)
pkg_check_modules(GLESV2 IMPORTED_TARGET QUIET ${PKG_CONFIG_NAME})
if(GLESV2_FOUND)
message(STATUS "lvgl: OpenGL ES: found via pkg-config")
lvgl_link_pkg_config(
PRIVATE
TARGETS
PkgConfig::GLESV2
PKG_CONFIG
${PKG_CONFIG_NAME}
PKG_LIB_PRIVATE
${PKG_LIB_PRIVATE})
return()
endif()
endif()
message(FATAL_ERROR "lvgl: OpenGL ES not found. Please install libgles")
@@ -0,0 +1,53 @@
# ============================================================
# libuv Configuration
# ============================================================
set(CMAKE_PACKAGE_NAME "libuv")
set(PKG_CONFIG_NAME "libuv")
set(PKG_LIB_PRIVATE "-luv")
option(LV_USE_FIND_PACKAGE_LIBUV "Resolve libuv via find_package"
${LV_USE_FIND_PACKAGE})
option(LV_USE_PKG_CONFIG_LIBUV "Resolve libuv via pkg-config"
${LV_USE_PKG_CONFIG})
if(LV_USE_FIND_PACKAGE_LIBUV)
find_package(${CMAKE_PACKAGE_NAME} CONFIG QUIET)
# libuv exports the shared library as libuv::uv and the static one as
# libuv::uv_a. Which of them exists depends on how it was built.
foreach(_target libuv::uv_a libuv::uv)
if(TARGET ${_target})
message(STATUS "lvgl: libuv: found via find_package")
lvgl_link_packages(
PRIVATE
TARGETS
${_target}
CMAKE_PACKAGE
${CMAKE_PACKAGE_NAME}
PKG_CONFIG
${PKG_CONFIG_NAME}
PKG_LIB_PRIVATE
${PKG_LIB_PRIVATE})
return()
endif()
endforeach()
endif()
if(LV_USE_PKG_CONFIG_LIBUV AND PkgConfig_FOUND)
pkg_check_modules(LIBUV IMPORTED_TARGET QUIET ${PKG_CONFIG_NAME})
if(LIBUV_FOUND)
message(STATUS "lvgl: libuv: found via pkg-config")
lvgl_link_pkg_config(
PRIVATE
TARGETS
PkgConfig::LIBUV
PKG_CONFIG
${PKG_CONFIG_NAME}
PKG_LIB_PRIVATE
${PKG_LIB_PRIVATE})
return()
endif()
endif()
message(
FATAL_ERROR
"lvgl: libuv not found. Please install libuv.")
+27 -5
View File
@@ -18,7 +18,26 @@ endmacro()
# Check if the user wants to use a defconfig, using the -DLV_BUILD_DEFCONFIG_PATH option
if(LV_BUILD_DEFCONFIG_PATH)
lv_normalize_config_path(LV_BUILD_DEFCONFIG_PATH "defconfig" DOTCONFIG)
# Several defconfigs can be given as a ";"-separated list. They are merged in
# order, so a later fragment overrides the value set by an earlier one. This
# lets related configurations share a common base instead of duplicating it.
set(DOTCONFIG)
foreach(defconfig IN LISTS LV_BUILD_DEFCONFIG_PATH)
lv_normalize_config_path(defconfig "defconfig" defconfig_abs)
list(APPEND DOTCONFIG ${defconfig_abs})
endforeach()
list(LENGTH DOTCONFIG defconfig_count)
if(LV_BUILD_DEFCONFIG_STRICT)
# Apply the stricter checks: assignments to unknown or promptless
# symbols, and values that end up not taking effect, become errors.
# Overriding a symbol set by an earlier fragment is allowed.
set(KCONFIG_INPUT_FLAGS --handwritten-input-configs)
elseif(defconfig_count GREATER 1)
# Merging without the strict checks needs this, otherwise overriding a
# symbol set by an earlier fragment is reported as an error.
set(KCONFIG_INPUT_FLAGS --forced-input-configs)
endif()
elseif(LV_BUILD_DOTCONFIG_PATH)
lv_normalize_config_path(LV_BUILD_DOTCONFIG_PATH ".config" DOTCONFIG)
else()
@@ -36,14 +55,17 @@ else()
endif()
endif()
if (NOT EXISTS ${DOTCONFIG})
message(FATAL_ERROR "defconfig: ${DOTCONFIG} - does not exist")
endif()
foreach(config IN LISTS DOTCONFIG)
if (NOT EXISTS ${config})
message(FATAL_ERROR "defconfig: ${config} - does not exist")
endif()
endforeach()
execute_process(
COMMAND ${CMAKE_COMMAND} -E env LVGL_DIR=${LVGL_ROOT_DIR}
${Python_EXECUTABLE}
${Python_EXECUTABLE}
${LVGL_ROOT_DIR}/scripts/build-tools/kconfig.py
${KCONFIG_INPUT_FLAGS}
${LV_BUILD_KCONFIG_ROOT}
${OUTPUT_DOTCONFIG}
${AUTOCONF_H}
+45 -5
View File
@@ -10,8 +10,14 @@ set(LV_BUILD_CONF_DIR "" CACHE PATH
"Can be used to specify the include dir containing lv_conf.h, to be used in conjunction with LV_CONF_INCLUDE_SIMPLE")
option(LV_BUILD_USE_KCONFIG "Use Kconfig" OFF)
set(LV_BUILD_DEFCONFIG_PATH "" CACHE PATH
"Supply the default Kconfig configuration - used with Kconfig")
set(LV_BUILD_DEFCONFIG_PATH "" CACHE STRING
"Supply the default Kconfig configuration - used with Kconfig. Accepts a \
\";\"-separated list of defconfigs, merged in order so later ones override earlier ones")
option(LV_BUILD_DEFCONFIG_STRICT
"Fail if a defconfig assigns an unknown or promptless symbol, or a value \
that ends up having no effect. Off by default so that existing configurations \
keep working" OFF)
set(LV_BUILD_DOTCONFIG_PATH "" CACHE PATH
"Path to .config path - used with Kconfig")
@@ -41,6 +47,8 @@ option(LV_USE_FIND_PACKAGE "Resolve dependencies via find_package" ON)
option(LV_USE_PKG_CONFIG "Resolve dependencies via pkg-config (requires pkg-config to be installed)" ON)
option(LV_FETCH_DEPENDENCIES "Fetch dependencies from source if not found on the system" ON)
option(LV_BUILD_TESTS "Build the unit tests in the tests directory" OFF)
option(CONFIG_LV_BUILD_DEMOS "Build demos" ON)
option(CONFIG_LV_BUILD_EXAMPLES "Build examples" ON)
option(CONFIG_LV_USE_THORVG_INTERNAL "Use the internal version of ThorVG" ON)
@@ -52,6 +60,31 @@ if (LV_BUILD_CONF_PATH AND LV_BUILD_CONF_DIR)
message(FATAL_ERROR "can not use LV_BUILD_CONF_DIR and LV_BUILD_CONF_PATH at the same time")
endif()
if (LV_BUILD_TESTS)
if (NOT EXISTS ${LVGL_ROOT_DIR}/tests/CMakeLists.txt)
message(FATAL_ERROR "LV_BUILD_TESTS is set but the tests directory is missing")
endif()
# Every test configuration is a set of Kconfig defconfigs, see
# tests/configs and the recipes in tests/main.py
set(LV_BUILD_USE_KCONFIG ON)
set(LV_BUILD_DEFCONFIG_STRICT ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
# Lets `ctest -T memcheck` work. include(CTest) reads this, so it has to be
# found here rather than in tests/CMakeLists.txt.
find_program(VALGRIND_EXECUTABLE valgrind)
if (VALGRIND_EXECUTABLE)
set(MEMORYCHECK_COMMAND ${VALGRIND_EXECUTABLE})
set(MEMORYCHECK_COMMAND_OPTIONS --error-exitcode=1)
endif()
enable_testing()
include(CTest)
endif()
if (LV_BUILD_USE_KCONFIG)
# If Kconfig is used then the configuration has to be expanded
set(LV_BUILD_SET_CONFIG_OPTS ON)
@@ -510,10 +543,17 @@ if (HAS_PARENT_SCOPE)
set(LVGL_COMPILER_DEFINES ${COMP_DEF} PARENT_SCOPE)
else()
# The file has been included by tests/CMakeLists.txt -
# or somewhere else, set variable containing the normalized path of the include dir
# containing the configuration file
# Building LVGL as the top-level project, set variable containing the
# normalized path of the include dir containing the configuration file
set(LVGL_CONF_INC_DIR ${CONF_INC_DIR})
set(LVGL_CONF_PATH ${CONF_PATH})
set(LVGL_COMPILER_DEFINES ${COMP_DEF})
endif()
############################## TESTS ######################################
# Added last so that the tests can adjust the targets created above, e.g. to
# compile LVGL itself with the sanitizers and the strict warning set.
if (LV_BUILD_TESTS)
add_subdirectory(${LVGL_ROOT_DIR}/tests tests)
endif()
+12
View File
@@ -4168,6 +4168,14 @@
#endif
#endif
#ifndef LV_USE_NANOVG_TEST_HEADLESS
#ifdef CONFIG_LV_USE_NANOVG_TEST_HEADLESS
#define LV_USE_NANOVG_TEST_HEADLESS CONFIG_LV_USE_NANOVG_TEST_HEADLESS
#else
#define LV_USE_NANOVG_TEST_HEADLESS 0
#endif
#endif
#ifndef LV_USE_MONKEY
#ifdef CONFIG_LV_USE_MONKEY
#define LV_USE_MONKEY CONFIG_LV_USE_MONKEY
@@ -5374,6 +5382,10 @@ LV_EXPORT_CONST_INT(LV_DRAW_BUF_ALIGN);
#error "LV_USE_TEST_SCREENSHOT_COMPARE requires LV_USE_TEST (Kconfig depends on)"
#endif
#if LV_USE_NANOVG_TEST_HEADLESS && !(LV_USE_DRAW_NANOVG && LV_USE_TEST)
#error "LV_USE_NANOVG_TEST_HEADLESS requires LV_USE_DRAW_NANOVG && LV_USE_TEST (Kconfig depends on)"
#endif
#if LV_GLOBAL_USE_CUSTOM_INCLUDE && !(LV_ENABLE_GLOBAL_CUSTOM)
#error "LV_GLOBAL_USE_CUSTOM_INCLUDE requires LV_ENABLE_GLOBAL_CUSTOM (Kconfig depends on)"
#endif
+9
View File
@@ -2129,6 +2129,15 @@
#define LV_TEST_SCREENSHOT_CREATE_REFERENCE_IMAGE 1
#endif /*LV_USE_TEST_SCREENSHOT_COMPARE*/
#if LV_USE_DRAW_NANOVG
/** Render into an off-screen EGL pbuffer instead of a window and read the
* pixels back into the LVGL draw buffer, so screenshot compares work the
* same way as with the software renderer. Requires EGL and GLESv2.
*/
#define LV_USE_NANOVG_TEST_HEADLESS 0
#endif /*LV_USE_DRAW_NANOVG*/
#endif /*LV_USE_TEST*/
/** Feed random input events to the UI for stress testing. */
Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

+2 -2
View File
@@ -1,4 +1,4 @@
vcpkg install vcpkg-tool-ninja libpng freetype opengl glfw3
vcpkg install vcpkg-tool-ninja libpng freetype sdl2
if %errorlevel% neq 0 exit /b %errorlevel%
pip install pypng lz4 kconfiglib
pip install pypng lz4 kconfiglib pcpp
if %errorlevel% neq 0 exit /b %errorlevel%
+8
View File
@@ -10,11 +10,13 @@ libwebp-dev
libfreetype-dev
libglfw3-dev
libsdl2-dev
libsdl2-image-dev
libpng-dev:i386
libjpeg-dev:i386
libwebp-dev:i386
libfreetype-dev:i386
libsdl2-dev:i386
libsdl2-image-dev:i386
ruby-full
gcovr
cmake
@@ -46,3 +48,9 @@ libgl1-mesa-dri
libegl-dev:i386
libgles-dev:i386
libgl1-mesa-dri:i386
libx11-dev
libx11-dev:i386
libgbm-dev
libgbm-dev:i386
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
+1 -1
View File
@@ -14,7 +14,7 @@
# --64 Build/run as 64-bit (default).
# --both Run both 64-bit and 32-bit, back to back.
# --build-option <OPT> Pass --build-options=<OPT> to tests/main.py
# (e.g. OPTIONS_TEST_SYSHEAP, OPTIONS_16BIT, ...).
# (e.g. OPTIONS_TEST_SYSHEAP, OPTIONS_MINIMAL, ...).
# When omitted, main.py runs its full matrix.
# --test-suite <REGEX> Pass --test-suite=<REGEX> to tests/main.py
# (ctest --tests-regex filter).
+8
View File
@@ -19,4 +19,12 @@ config LV_TEST_SCREENSHOT_CREATE_REFERENCE_IMAGE
When a reference image does not exist yet, create it from the rendered
screen instead of failing the compare.
config LV_USE_NANOVG_TEST_HEADLESS
bool "Headless EGL display for NanoVG"
depends on LV_USE_DRAW_NANOVG
help
Render into an off-screen EGL pbuffer instead of a window and read the
pixels back into the LVGL draw buffer, so screenshot compares work the
same way as with the software renderer. Requires EGL and GLESv2.
endif #LV_USE_TEST
-4
View File
@@ -12,10 +12,6 @@
*********************/
#include "../../lvgl_public.h"
#ifndef LV_USE_NANOVG_TEST_HEADLESS
#define LV_USE_NANOVG_TEST_HEADLESS 0
#endif
#if LV_USE_TEST && LV_USE_DRAW_NANOVG && LV_USE_NANOVG_TEST_HEADLESS
#include "../../draw/nanovg/lv_draw_nanovg.h"
+2 -11
View File
@@ -542,15 +542,6 @@ static void draw_from_cached_texture(lv_draw_task_t * t)
lv_draw_opengles_unit_t * u = (lv_draw_opengles_unit_t *)t->draw_unit;
cache_data_t data_to_find;
data_to_find.draw_dsc = (lv_draw_dsc_base_t *)t->draw_dsc;
bool h_flip = false;
bool v_flip = false;
#if LV_USE_3DTEXTURE
if(t->type == LV_DRAW_TASK_TYPE_3D) {
lv_draw_3d_dsc_t * _3d_dsc = (lv_draw_3d_dsc_t *)t->draw_dsc;
h_flip = _3d_dsc->h_flip;
v_flip = _3d_dsc->v_flip;
}
#endif
data_to_find.w = lv_area_get_width(&t->_real_area);
data_to_find.h = lv_area_get_height(&t->_real_area);
data_to_find.texture = 0;
@@ -639,8 +630,8 @@ static void execute_drawing(lv_draw_opengles_unit_t * u)
}
if(fill_dsc->opa >= LV_OPA_MAX) {
float tex_w = (float)lv_area_get_width(&fill_area);
float tex_h = (float)lv_area_get_height(&fill_area);
int32_t tex_w = lv_area_get_width(&fill_area);
int32_t tex_h = lv_area_get_height(&fill_area);
GL_CALL(glEnable(GL_SCISSOR_TEST));
GL_CALL(glScissor(fill_area.x1, targ_tex_h - fill_area.y1 - tex_h, tex_w, tex_h));
/* swap red and blue channels here as they will be swapped back during flushing*/
+1 -9
View File
@@ -23,14 +23,6 @@
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#if LV_X11_RENDER_MODE_PARTIAL
#define LV_X11_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
#elif defined LV_X11_RENDER_MODE_DIRECT
#define LV_X11_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT
#elif defined LV_X11_RENDER_MODE_FULL
#define LV_X11_RENDER_MODE LV_DISPLAY_RENDER_MODE_FULL
#endif
/**********************
* TYPEDEFS
**********************/
@@ -74,7 +66,7 @@ typedef struct {
typedef lv_color32_t color_t;
static inline lv_color32_t get_px(color_t p)
{
return (lv_color32_t)p;
return p;
}
#elif LV_COLOR_DEPTH == 24
typedef lv_color_t color_t;
-1
View File
@@ -6,4 +6,3 @@
*_err.png
build_*/
report*/
wayland_protocols/
+172 -507
View File
File diff suppressed because it is too large Load Diff
+18
View File
@@ -71,10 +71,28 @@ GitHub's CI automatically runs these tests on pushes and pull requests to `maste
- `test_cases_perf` The performance tests,
- `test_runners` Generated automatically from the files in `test_cases`.
- other miscellaneous files and folders
- `configs` Kconfig defconfig fragments the build configurations are made of
- `ref_imgs` - Reference images for screenshot compare
- `report` - Coverage report. Generated if the `report` flag was passed to `./main.py`
- `unity` Source files of the test engine
## Build configurations
Every build configuration is a list of defconfig fragments from `configs`,
merged in order so that a later fragment overrides an earlier one. The recipes
live in `build_only_options` and `test_options` in [`main.py`](./main.py), which
passes them to CMake through `LV_BUILD_DEFCONFIG_PATH`. `CMakeLists.txt` derives
the rest - warning flags, which reference images to compare against, which
libraries LVGL needs - from the resulting configuration, so a new configuration
usually only takes a new fragment plus an entry in `main.py`.
```sh
cmake -B build -DLV_BUILD_TESTS=ON -DLVGL_TEST_ENABLE=ON \
-DLV_BUILD_DEFCONFIG_PATH="tests/configs/common.defconfig;tests/configs/full.defconfig;..."
```
Prefer `main.py` as it picks the right fragments for the host and architecture but this is useful when debugging the build itself.
## Add new tests
### Create new test file
+4
View File
@@ -0,0 +1,4 @@
CONFIG_LV_USE_BUILTIN_MALLOC=y
CONFIG_LV_USE_BUILTIN_STRING=y
CONFIG_LV_USE_BUILTIN_SPRINTF=y
CONFIG_LV_MEM_SIZE=33554432
+11
View File
@@ -0,0 +1,11 @@
# Route failed asserts to lv_test_assert_fail() so they fail the test case
# instead of halting. The path is relative to the LVGL root directory.
CONFIG_LV_ASSERT_USE_CUSTOM_INCLUDE=y
CONFIG_LV_ASSERT_CUSTOM_INCLUDE="tests/src/lv_test_assert.h"
# Test helpers: emulated input devices, time emulation and screenshot compare.
CONFIG_LV_USE_TEST=y
CONFIG_LV_USE_TEST_SCREENSHOT_COMPARE=y
CONFIG_LV_TEST_SCREENSHOT_CREATE_REFERENCE_IMAGE=y
CONFIG_LV_USE_LOG=y
+13
View File
@@ -0,0 +1,13 @@
# Test configuration to be added on top of builtin_heap.defconfig.
CONFIG_LV_USE_MEM_MONITOR=y
CONFIG_LV_OBJ_STYLE_CACHE=y
# Non power of 2 so that we do not accidentally rely on the alignment
# lv_malloc() happens to return.
CONFIG_LV_DRAW_BUF_ALIGN=852
# Exercise the generic widget property get/set API. Only covered here because it
# relies on C11 anonymous structs and unions, so the build cannot be pedantic.
CONFIG_LV_USE_OBJ_PROPERTY=y
CONFIG_LV_USE_OBJ_PROPERTY_NAME=y
+2
View File
@@ -0,0 +1,2 @@
CONFIG_LV_COLOR_DEPTH_16=y
CONFIG_LV_DPI_DEF=90
+2
View File
@@ -0,0 +1,2 @@
CONFIG_LV_COLOR_DEPTH_32=y
CONFIG_LV_DPI_DEF=160
+131
View File
@@ -0,0 +1,131 @@
# Enable as much of LVGL as possible, so that the test suite exercises the
# widest feature set.
CONFIG_LV_CACHE_DEF_SIZE=10485760
CONFIG_LV_DRAW_SW_SHADOW_CACHE_SIZE=8
# Increase the draw thread stack size to 64KB in order to run ThorVG
CONFIG_LV_DRAW_THREAD_STACK_SIZE=65536
CONFIG_LV_USE_DRAW_SW_COMPLEX_GRADIENTS=y
CONFIG_LV_USE_FLOAT=y
CONFIG_LV_USE_MATRIX=y
CONFIG_LV_LOG_LEVEL_TRACE=y
CONFIG_LV_LOG_PRINTF=y
CONFIG_LV_USE_ASSERT_STYLE=y
CONFIG_LV_USE_ASSERT_MEM_INTEGRITY=y
CONFIG_LV_USE_ASSERT_OBJ=y
CONFIG_LV_USE_PROFILER=y
CONFIG_LV_USE_PROFILER_BUILTIN=y
CONFIG_LV_USE_PROFILER_BUILTIN_POSIX=y
CONFIG_LV_USE_SYSMON=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_MONKEY=y
# Fonts
CONFIG_LV_FONT_MONTSERRAT_8=y
CONFIG_LV_FONT_MONTSERRAT_10=y
CONFIG_LV_FONT_MONTSERRAT_12=y
CONFIG_LV_FONT_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_18=y
CONFIG_LV_FONT_MONTSERRAT_20=y
CONFIG_LV_FONT_MONTSERRAT_22=y
CONFIG_LV_FONT_MONTSERRAT_24=y
CONFIG_LV_FONT_MONTSERRAT_26=y
CONFIG_LV_FONT_MONTSERRAT_28=y
CONFIG_LV_FONT_MONTSERRAT_30=y
CONFIG_LV_FONT_MONTSERRAT_32=y
CONFIG_LV_FONT_MONTSERRAT_34=y
CONFIG_LV_FONT_MONTSERRAT_36=y
CONFIG_LV_FONT_MONTSERRAT_38=y
CONFIG_LV_FONT_MONTSERRAT_40=y
CONFIG_LV_FONT_MONTSERRAT_42=y
CONFIG_LV_FONT_MONTSERRAT_44=y
CONFIG_LV_FONT_MONTSERRAT_46=y
CONFIG_LV_FONT_MONTSERRAT_48=y
CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED=y
CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW=y
CONFIG_LV_FONT_SOURCE_HAN_SANS_SC_14_CJK=y
CONFIG_LV_FONT_SOURCE_HAN_SANS_SC_16_CJK=y
CONFIG_LV_FONT_UNSCII_8=y
CONFIG_LV_FONT_UNSCII_16=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_14=y
CONFIG_LV_FONT_FMT_TXT_LARGE=y
CONFIG_LV_USE_FONT_COMPRESSED=y
CONFIG_LV_USE_FONT_MANAGER=y
CONFIG_LV_USE_FREETYPE=y
# CONFIG_LV_FREETYPE_USE_LVGL_PORT is not set
CONFIG_LV_FREETYPE_CACHE_FT_GLYPH_CNT=64
CONFIG_LV_USE_TINY_TTF=y
CONFIG_LV_TINY_TTF_FILE_SUPPORT=y
CONFIG_LV_USE_IMGFONT=y
# Text
CONFIG_LV_USE_BIDI=y
CONFIG_LV_USE_ARABIC_PERSIAN_CHARS=y
CONFIG_LV_USE_TRANSLATION=y
CONFIG_LV_LABEL_TEXT_SELECTION=y
# Widgets and layouts
CONFIG_LV_USE_FLEX=y
CONFIG_LV_USE_GRID=y
CONFIG_LV_USE_GRIDNAV=y
CONFIG_LV_USE_FRAGMENT=y
CONFIG_LV_USE_OBSERVER=y
CONFIG_LV_USE_FILE_EXPLORER=y
CONFIG_LV_USE_IME_PINYIN=y
CONFIG_LV_USE_CALENDAR_CHINESE=y
CONFIG_LV_USE_GESTURE_RECOGNITION=y
# Object identification
CONFIG_LV_USE_OBJ_ID=y
CONFIG_LV_USE_OBJ_ID_BUILTIN=y
CONFIG_LV_OBJ_ID_AUTO_ASSIGN=y
CONFIG_LV_USE_OBJ_NAME=y
# File systems
CONFIG_LV_USE_FS_STDIO=y
CONFIG_LV_FS_STDIO_LETTER=65
CONFIG_LV_FS_STDIO_CACHE_SIZE=512
CONFIG_LV_USE_FS_MEMFS=y
CONFIG_LV_FS_MEMFS_LETTER=77
CONFIG_LV_FS_DEFAULT_DRIVER_LETTER=65
# Image and video decoders
CONFIG_LV_USE_RLE=y
CONFIG_LV_USE_LZ4=y
CONFIG_LV_USE_LZ4_INTERNAL=y
CONFIG_LV_USE_LODEPNG=y
CONFIG_LV_USE_LIBPNG=y
CONFIG_LV_USE_BMP=y
CONFIG_LV_USE_TJPGD=y
CONFIG_LV_USE_GIF=y
CONFIG_LV_USE_SNAPSHOT=y
CONFIG_LV_USE_QRCODE=y
CONFIG_LV_USE_BARCODE=y
CONFIG_LV_USE_LOTTIE=y
# Vector graphics
CONFIG_LV_USE_VECTOR_GRAPHIC=y
CONFIG_LV_USE_THORVG=y
CONFIG_LV_USE_THORVG_INTERNAL=y
CONFIG_LV_USE_SVG=y
CONFIG_LV_USE_SVG_ANIMATION=y
CONFIG_LV_USE_SVG_DEBUG=y
# Demos. Several test cases render them and compare against a reference image.
CONFIG_LV_USE_DEMO_WIDGETS=y
CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER=y
CONFIG_LV_USE_DEMO_STRESS=y
CONFIG_LV_USE_DEMO_RENDER=y
CONFIG_LV_USE_DEMO_MUSIC=y
CONFIG_LV_USE_DEMO_BENCHMARK=y
CONFIG_LV_USE_DEMO_VECTOR_GRAPHIC=y
# Display controller drivers
CONFIG_LV_USE_GENERIC_MIPI=y
CONFIG_LV_USE_ILI9341=y
CONFIG_LV_USE_ST7735=y
CONFIG_LV_USE_ST7789=y
CONFIG_LV_USE_ST7796=y
CONFIG_LV_USE_FT81X=y
+1
View File
@@ -0,0 +1 @@
CONFIG_LV_USE_GSTREAMER=y
+7
View File
@@ -0,0 +1,7 @@
# Enables each driver's EGL backend to be added on top of linux_sw.defconfig
CONFIG_LV_USE_DRAW_OPENGLES=y
CONFIG_LV_LINUX_DRM_BACKEND_EGL=y
CONFIG_LV_WAYLAND_BACKEND_EGL=y
CONFIG_LV_SDL_BACKEND_EGL=y
+22
View File
@@ -0,0 +1,22 @@
# Every Linux display and input driver, each on its software backend
CONFIG_LV_USE_LINUX_FBDEV=y
CONFIG_LV_USE_LINUX_DRM=y
# CONFIG_LV_LINUX_DRM_AUTO_BACKEND is not set
CONFIG_LV_LINUX_DRM_BACKEND_FBDEV=y
CONFIG_LV_USE_WAYLAND=y
# CONFIG_LV_WAYLAND_AUTO_BACKEND is not set
CONFIG_LV_WAYLAND_BACKEND_SHM=y
# X11 has no backend choice, it is software only
CONFIG_LV_USE_X11=y
CONFIG_LV_USE_SDL=y
# CONFIG_LV_SDL_AUTO_BACKEND is not set
CONFIG_LV_SDL_BACKEND_SW=y
CONFIG_LV_USE_LIBINPUT=y
CONFIG_LV_LIBINPUT_XKB=y
CONFIG_LV_USE_EVDEV=y
+8
View File
@@ -0,0 +1,8 @@
# Applied on top of the empty preset in configs/defconfigs, which is what
# actually switches the widgets, themes and layouts off.
# Disable assertions to catch unused variables errors
CONFIG_LV_MEM_SIZE=65535
# CONFIG_LV_USE_ASSERT_NULL is not set
# CONFIG_LV_USE_ASSERT_MALLOC is not set
+9
View File
@@ -0,0 +1,9 @@
# NanoVG rendering into an off-screen EGL pbuffer, so that screenshots can be
# compared without a window system.
CONFIG_LV_USE_OPENGLES=y
CONFIG_LV_USE_DRAW_NANOVG=y
CONFIG_LV_USE_NANOVG_TEST_HEADLESS=y
# NanoVG expects a compact stride (no padding)
CONFIG_LV_DRAW_BUF_STRIDE_ALIGN=1
+15
View File
@@ -0,0 +1,15 @@
# NuttX port
CONFIG_LV_USE_NUTTX=y
CONFIG_LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP=y
CONFIG_LV_NUTTX_DEFAULT_DRAW_BUF_USE_INDEPENDENT_IMAGE_HEAP=y
CONFIG_LV_USE_NUTTX_LIBUV=y
# CONFIG_LV_USE_NUTTX_CUSTOM_INIT is not set
CONFIG_LV_USE_NUTTX_LCD=y
CONFIG_LV_NUTTX_LCD_DOUBLE_BUFFER=y
CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y
CONFIG_LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE=20
CONFIG_LV_USE_NUTTX_MOUSE=y
CONFIG_LV_USE_NUTTX_MOUSE_MOVE_STEP=1
CONFIG_LV_USE_NUTTX_TRACE_FILE=y
CONFIG_LV_NUTTX_TRACE_FILE_PATH="/data/lvgl-trace.log"
+3
View File
@@ -0,0 +1,3 @@
# RISC-V Vector software rendering assembly, exercised under emulation.
CONFIG_LV_DRAW_SW_ASM_RISCV_V=y
+11
View File
@@ -0,0 +1,11 @@
# Added to the configurations whose test suites are actually executed, on top of
# the ones that are only compiled.
# Reference images were rendered at this DPI
CONFIG_LV_DPI_DEF=130
# The test runner installs its own log callback
# CONFIG_LV_LOG_PRINTF is not set
# The test cases do not use the examples
# CONFIG_LV_BUILD_EXAMPLES is not set
+17
View File
@@ -0,0 +1,17 @@
# Use the C library allocator and string functions, so that ASan/LSan/UBSan can
# see every allocation.
CONFIG_LV_USE_CLIB_MALLOC=y
CONFIG_LV_USE_CLIB_STRING=y
CONFIG_LV_USE_CLIB_SPRINTF=y
# CONFIG_LV_OBJ_STYLE_CACHE is not set
# Run the tests with bin images loaded to RAM
CONFIG_LV_BIN_DECODER_RAM_LOAD=y
# Use a large stride so that any indexing issue causes a visible failure, and a
# non power of 2 buffer alignment so that we do not accidentally rely on the
# alignment malloc() happens to return.
CONFIG_LV_DRAW_BUF_STRIDE_ALIGN=64
CONFIG_LV_DRAW_BUF_ALIGN=852
+14
View File
@@ -0,0 +1,14 @@
# Features that need a POSIX environment or libraries that are not built on
# Windows.
CONFIG_LV_OS_PTHREAD=y
CONFIG_LV_USE_FS_POSIX=y
CONFIG_LV_FS_POSIX_LETTER=66
CONFIG_LV_USE_LIBJPEG_TURBO=y
CONFIG_LV_USE_LIBWEBP=y
CONFIG_LV_USE_FFMPEG=y
CONFIG_LV_FFMPEG_DUMP_FORMAT=y
CONFIG_LV_FFMPEG_PLAYER_USE_LV_FS=y
+32
View File
@@ -0,0 +1,32 @@
# VG-Lite GPU rendering, simulated with ThorVG.
CONFIG_LV_USE_DRAW_VG_LITE=y
CONFIG_LV_USE_VG_LITE_THORVG=y
CONFIG_LV_USE_THORVG_INTERNAL=y
CONFIG_LV_DRAW_TRANSFORM_USE_MATRIX=y
# Enable the VG-Lite custom external 'gpu_init()' function
CONFIG_LV_VG_LITE_USE_GPU_INIT=y
CONFIG_LV_VG_LITE_USE_ASSERT=y
# Let the GPU batch as many draw tasks as it can
CONFIG_LV_VG_LITE_FLUSH_MAX_COUNT=0
# Simulate shadows with a border. Usually faster, but does not render
# identically to the software renderer.
CONFIG_LV_VG_LITE_USE_BOX_SHADOW=y
# 4K bytes per cached gradient image
CONFIG_LV_VG_LITE_GRAD_CACHE_CNT=32
# CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN is not set
# CONFIG_LV_VG_LITE_DISABLE_BLIT_RECT_OFFSET is not set
# VG-Lite needs 64 byte aligned buffers. The draw buffers get this from
# LV_DRAW_BUF_ALIGN, the static font and image data from LV_ATTRIBUTE_MEM_ALIGN,
# which is not an lv_conf.h option of its own and so comes from a header.
CONFIG_LV_DRAW_BUF_ALIGN=64
CONFIG_LV_ATTRIBUTE_USE_CUSTOM_INCLUDE=y
CONFIG_LV_ATTRIBUTE_CUSTOM_INCLUDE="tests/src/lv_test_attributes.h"
CONFIG_LV_USE_PERF_MONITOR_LOG_MODE=y
+3
View File
@@ -0,0 +1,3 @@
# On 32-bit hosts, cover the other side of this VG-Lite configuration switch.
CONFIG_LV_VG_LITE_DISABLE_BLIT_RECT_OFFSET=y
+6
View File
@@ -0,0 +1,6 @@
# The Windows host, used instead of unix.defconfig on windows devices
CONFIG_LV_OS_WINDOWS=y
CONFIG_LV_USE_FS_WIN32=y
CONFIG_LV_FS_WIN32_LETTER=67
+7
View File
@@ -0,0 +1,7 @@
# Counterpart of linux_sw.defconfig. Enables every driver that can run on windows
CONFIG_LV_USE_WINDOWS=y
CONFIG_LV_USE_SDL=y
# CONFIG_LV_SDL_AUTO_BACKEND is not set
CONFIG_LV_SDL_BACKEND_SW=y
+322 -136
View File
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
/**
* @file lv_test_assert.h
*
* Custom assert handler for the unit tests. Pulled in by lv_conf_internal.h
* through LV_ASSERT_CUSTOM_INCLUDE, see tests/configs/common.defconfig.
*/
#ifndef LV_TEST_ASSERT_H
#define LV_TEST_ASSERT_H
#ifdef __cplusplus
extern "C" {
#endif
void lv_test_assert_fail(void);
#define LV_ASSERT_HANDLER lv_test_assert_fail();
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_TEST_ASSERT_H*/
+20
View File
@@ -0,0 +1,20 @@
/**
* @file lv_test_attributes.h
*
* Pulled in by lv_conf_internal.h through LV_ATTRIBUTE_CUSTOM_INCLUDE for the
* configurations that need aligned static data, see configs/vg_lite.defconfig.
*/
#ifndef LV_TEST_ATTRIBUTES_H
#define LV_TEST_ATTRIBUTES_H
/* VG-Lite refuses to work on unaligned image and glyph data. The generated font
* and image sources apply LV_ATTRIBUTE_MEM_ALIGN to their data arrays, so this
* is what aligns the test assets. */
#ifdef _MSC_VER
#define LV_ATTRIBUTE_MEM_ALIGN __declspec(align(LV_DRAW_BUF_ALIGN))
#else
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(LV_DRAW_BUF_ALIGN)))
#endif
#endif /*LV_TEST_ATTRIBUTES_H*/
-141
View File
@@ -1,141 +0,0 @@
/**
* @file lv_test_conf.h
*
*/
#ifndef LV_TEST_CONF_H
#define LV_TEST_CONF_H
#define LV_CONF_SUPPRESS_DEFINE_CHECK 1
#ifdef __cplusplus
extern "C" {
#endif
/***********************
* PLATFORM CONFIGS
***********************/
#ifdef LVGL_CI_USING_SYS_HEAP
#define LV_USE_STDLIB_MALLOC LV_STDLIB_CLIB
#define LV_USE_STDLIB_STRING LV_STDLIB_CLIB
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_CLIB
#define LV_USE_OS LV_OS_PTHREAD
#define LV_OBJ_STYLE_CACHE 0
#define LV_BIN_DECODER_RAM_LOAD 1 /* Run test with bin image loaded to RAM */
#ifndef LV_DRAW_BUF_STRIDE_ALIGN
#define LV_DRAW_BUF_STRIDE_ALIGN 64 /* Use a large value to be sure any issues will cause crash */
#endif
#endif
#ifdef LVGL_CI_USING_DEF_HEAP
#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
#define LV_OBJ_STYLE_CACHE 1
#define LV_BIN_DECODER_RAM_LOAD 0
#define LV_USE_MEM_MONITOR 1
#endif
#ifdef MICROPYTHON
#define LV_USE_BUILTIN_MALLOC 0
#define LV_USE_BUILTIN_MEMCPY 1
#define LV_USE_BUILTIN_SNPRINTF 1
#define LV_STDLIB_INCLUDE "include/lv_mp_mem_custom_include.h"
#define LV_MALLOC m_malloc
#define LV_REALLOC m_realloc
#define LV_FREE m_free
#define LV_MEMSET lv_memset_builtin
#define LV_MEMCPY lv_memcpy_builtin
#define LV_SNPRINTF lv_snprintf_builtin
#define LV_VSNPRINTF lv_vsnprintf_builtin
#define LV_STRLEN lv_strlen_builtin
#define LV_STRNCPY lv_strncpy_builtin
#define LV_ENABLE_GC 1
#define LV_GC_INCLUDE "py/mpstate.h"
#define LV_GC_ROOT(x) MP_STATE_PORT(x)
#endif
#ifndef __ASSEMBLY__
void lv_test_assert_fail(void);
#define LV_ASSERT_HANDLER lv_test_assert_fail();
typedef void * lv_user_data_t;
#endif
/***********************
* TEST CONFIGS
***********************/
#if !(defined(LV_TEST_OPTION)) || LV_TEST_OPTION == 5
#define LV_COLOR_DEPTH 32
#define LV_DPI_DEF 160
#include "lv_test_conf_full.h"
#elif LV_TEST_OPTION == 6
#define LV_COLOR_DEPTH 32
#define LV_DPI_DEF 160
#define LV_DRAW_BUF_ALIGN 64
#ifdef _MSC_VER
#define LV_ATTRIBUTE_MEM_ALIGN __declspec(align(LV_DRAW_BUF_ALIGN))
#else
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(LV_DRAW_BUF_ALIGN)))
#endif
#include "lv_test_conf_vg_lite.h"
#include "lv_test_conf_full.h"
#elif LV_TEST_OPTION == 7
#define LV_COLOR_DEPTH 32
#define LV_DPI_DEF 160
#define LV_USE_DRAW_SDL 1
#define LV_USE_SDL 1
#define LV_SDL_AUTO_BACKEND 0
#define LV_SDL_BACKEND LV_SDL_BACKEND_SW
#define LV_USE_NUTTX 1
#include "lv_test_conf_full.h"
#elif LV_TEST_OPTION == 8
#define LV_COLOR_DEPTH 32
#define LV_DPI_DEF 160
#define LV_USE_NANOVG_TEST_HEADLESS 1
#define LV_USE_OPENGLES 1
#define LV_USE_NANOVG 1
#define LV_USE_DRAW_NANOVG 1
#undef LV_DRAW_BUF_STRIDE_ALIGN
#define LV_DRAW_BUF_STRIDE_ALIGN 1 /* NanoVG expects compact stride (no padding) */
#include "lv_test_conf_full.h"
#elif LV_TEST_OPTION == 4
#define LV_COLOR_DEPTH 24
#define LV_DPI_DEF 120
#elif LV_TEST_OPTION == 3
#define LV_COLOR_DEPTH 16
#define LV_DPI_DEF 90
#include "lv_test_conf_minimal.h"
#elif LV_TEST_OPTION == 2
#define LV_COLOR_DEPTH 8
#define LV_DPI_DEF 60
#include "lv_test_conf_minimal.h"
#elif LV_TEST_OPTION == 1
#define LV_COLOR_DEPTH 1
#define LV_DPI_DEF 30
#define LV_DRAW_SW_COMPLEX 0
#include "lv_test_conf_minimal.h"
#endif
#if defined(LVGL_CI_USING_SYS_HEAP) || defined(LVGL_CI_USING_DEF_HEAP)
#undef LV_LOG_PRINTF
#ifndef LV_DRAW_BUF_ALIGN
/*Use non power of 2 to avoid the case when `malloc` returns aligned pointer by default, and use a large value be sure any issues will cause crash*/
#define LV_DRAW_BUF_ALIGN 852
#endif
/*For screenshots*/
#undef LV_DPI_DEF
#define LV_DPI_DEF 130
#endif
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_TEST_CONF_H*/
-217
View File
@@ -1,217 +0,0 @@
#ifndef LV_TEST_CONF_FULL_H
#define LV_TEST_CONF_FULL_H
#define LV_CHECK_ARG_LOG_MODE LV_CHECK_ARG_LOG_MODE_VERBOSE
#define LV_MEM_SIZE (32 * 1024 * 1024)
#define LV_DRAW_SW_SHADOW_CACHE_SIZE 8
#define LV_DRAW_THREAD_STACK_SIZE (64 * 1024) /*Increase stack size to 64KB in order to run ThorVG*/
#define LV_USE_LOG 1
#define LV_LOG_LEVEL LV_LOG_LEVEL_TRACE
#define LV_LOG_PRINTF 1
#define LV_USE_ASSERT_NULL 1
#define LV_USE_ASSERT_MALLOC 1
#define LV_USE_ASSERT_MEM_INTEGRITY 1
#define LV_USE_ASSERT_OBJ 1
#define LV_USE_ASSERT_STYLE 1
#define LV_USE_FLOAT 1
#define LV_USE_MATRIX 1
#define LV_FONT_MONTSERRAT_8 1
#define LV_FONT_MONTSERRAT_10 1
#define LV_FONT_MONTSERRAT_12 1
#define LV_FONT_MONTSERRAT_14 1
#define LV_FONT_MONTSERRAT_16 1
#define LV_FONT_MONTSERRAT_18 1
#define LV_FONT_MONTSERRAT_20 1
#define LV_FONT_MONTSERRAT_22 1
#define LV_FONT_MONTSERRAT_24 1
#define LV_FONT_MONTSERRAT_26 1
#define LV_FONT_MONTSERRAT_28 1
#define LV_FONT_MONTSERRAT_30 1
#define LV_FONT_MONTSERRAT_32 1
#define LV_FONT_MONTSERRAT_34 1
#define LV_FONT_MONTSERRAT_36 1
#define LV_FONT_MONTSERRAT_38 1
#define LV_FONT_MONTSERRAT_40 1
#define LV_FONT_MONTSERRAT_42 1
#define LV_FONT_MONTSERRAT_44 1
#define LV_FONT_MONTSERRAT_46 1
#define LV_FONT_MONTSERRAT_48 1
#define LV_FONT_MONTSERRAT_28_COMPRESSED 1
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1
#define LV_FONT_SOURCE_HAN_SANS_SC_14_CJK 1
#define LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 1
#define LV_FONT_UNSCII_8 1
#define LV_FONT_UNSCII_16 1
#define LV_FONT_DEFAULT &lv_font_montserrat_14
#define LV_FONT_FMT_TXT_LARGE 1
#define LV_USE_FONT_COMPRESSED 1
#define LV_USE_BIDI 1
#define LV_USE_ARABIC_PERSIAN_CHARS 1
#define LV_USE_SYSMON 1
#define LV_USE_PERF_MONITOR 1
#define LV_LABEL_TEXT_SELECTION 1
#define LV_USE_CALENDAR_CHINESE 1
#define LV_USE_LOTTIE 1
#define LV_USE_FLEX 1
#define LV_USE_GRID 1
#define LV_USE_FS_STDIO 1
#define LV_FS_STDIO_LETTER 'A'
#define LV_FS_STDIO_CACHE_SIZE 512
#ifndef _WIN32
#define LV_USE_FS_POSIX 1
#define LV_FS_POSIX_LETTER 'B'
#else
#define LV_USE_FS_WIN32 1
#define LV_FS_WIN32_LETTER 'C'
#endif
#define LV_USE_FS_MEMFS 1
#define LV_FS_MEMFS_LETTER 'M'
#define LV_FS_DEFAULT_DRIVER_LETTER 'A'
#define LV_USE_MONKEY 1
#define LV_USE_RLE 1
#define LV_USE_LODEPNG 1
#define LV_USE_LIBPNG 1
#define LV_USE_BMP 1
#define LV_USE_TJPGD 1
#ifndef _WIN32
#define LV_USE_LIBJPEG_TURBO 1
#ifndef LV_USE_LIBWEBP /* If WebP library is not found, defaulting to 0 in CMakeLists.txt */
#define LV_USE_LIBWEBP 1
#endif
#endif
#ifndef LV_USE_FFMPEG
#define LV_USE_FFMPEG 1
#define LV_FFMPEG_DUMP_FORMAT 1
#define LV_FFMPEG_PLAYER_USE_LV_FS 1
#endif
#define LV_USE_GIF 1
#define LV_USE_QRCODE 1
#define LV_USE_BARCODE 1
#define LV_USE_FRAGMENT 1
#define LV_USE_IMGFONT 1
#define LV_USE_IME_PINYIN 1
#define LV_USE_OBSERVER 1
#define LV_USE_FILE_EXPLORER 1
#define LV_USE_TINY_TTF 1
#define LV_TINY_TTF_FILE_SUPPORT 1
#define LV_USE_SNAPSHOT 1
#define LV_USE_THORVG 1
#define LV_USE_THORVG_INTERNAL 1
#define LV_USE_LZ4 1
#define LV_USE_LZ4_INTERNAL 1
#define LV_USE_VECTOR_GRAPHIC 1
#define LV_USE_SVG 1
#define LV_USE_SVG_ANIMATION 1
#define LV_USE_SVG_DEBUG 1
#define LV_USE_PROFILER 1
#define LV_PROFILER_INCLUDE "lv_profiler_builtin.h"
#define LV_USE_PROFILER_BUILTIN 1
#define LV_USE_PROFILER_BUILTIN_POSIX 1
#define LV_USE_GRIDNAV 1
#define LV_USE_XML 1
#define LV_USE_TRANSLATION 1
#define LV_USE_TEST 1
#define LV_USE_TEST_SCREENSHOT_COMPARE 1
#define LV_TEST_SCREENSHOT_CREATE_REFERENCE_IMAGE 1
#define LV_BUILD_EXAMPLES 1
#define LV_USE_DEMO_WIDGETS 1
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 1
#define LV_USE_DEMO_FLEX_LAYOUT 1
#define LV_USE_DEMO_STRESS 1
#define LV_USE_DEMO_MULTILANG 1
#define LV_USE_DEMO_RENDER 1
#define LV_USE_DEMO_MUSIC 1
#define LV_USE_DEMO_BENCHMARK 1
#define LV_USE_DEMO_EBIKE 1
#define LV_USE_DEMO_VECTOR_GRAPHIC 1
#define LV_USE_DEMO_HIGH_RES 1
#define LV_USE_DEMO_SMARTWATCH 1
#define LV_USE_OBJ_ID 1
#define LV_OBJ_ID_AUTO_ASSIGN 1
#define LV_USE_OBJ_ID_BUILTIN 1
#define LV_USE_OBJ_NAME 1
#define LV_CACHE_DEF_SIZE (10 * 1024 * 1024)
#ifndef LV_USE_LINUX_DRM
#define LV_USE_LINUX_DRM 1
#define LV_LINUX_DRM_AUTO_BACKEND 0
#define LV_LINUX_DRM_BACKEND LV_LINUX_DRM_BACKEND_FBDEV
#endif
#ifndef LV_USE_LINUX_FBDEV
#define LV_USE_LINUX_FBDEV 1
#endif
#ifndef LV_USE_NUTTX
#define LV_USE_NUTTX 0
#endif
#if defined(_WIN32) && LV_USE_NUTTX
#undef LV_USE_NUTTX /* Disable NuttX build on Windows */
#define LV_USE_NUTTX 0
#endif
#if LV_USE_NUTTX
#define LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP 1
#define LV_NUTTX_DEFAULT_DRAW_BUF_USE_INDEPENDENT_IMAGE_HEAP 1
#define LV_USE_NUTTX_LIBUV 1
#define LV_USE_NUTTX_CUSTOM_INIT 0
#define LV_USE_NUTTX_LCD 1
#define LV_NUTTX_LCD_BUFFER_COUNT 2
#define LV_NUTTX_LCD_BUFFER_SIZE 60
#define LV_USE_NUTTX_TOUCHSCREEN 1
#define LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE 20
#define LV_USE_NUTTX_MOUSE 1
#define LV_USE_NUTTX_MOUSE_MOVE_STEP 1
#define LV_USE_NUTTX_TRACE_FILE 1
#define LV_NUTTX_TRACE_FILE_PATH "/data/lvgl-trace.log"
#endif
#ifndef LV_USE_WAYLAND
#define LV_USE_WAYLAND 1
#define LV_WAYLAND_AUTO_BACKEND 0
#define LV_WAYLAND_BACKEND LV_WAYLAND_BACKEND_SHM
#endif
#define LV_USE_GENERIC_MIPI 1
#define LV_USE_ILI9341 1
#define LV_USE_ST7735 1
#define LV_USE_ST7789 1
#define LV_USE_ST7796 1
#define LV_USE_FT81X 1
#ifndef LV_USE_LIBINPUT
#define LV_USE_LIBINPUT 1
#endif
#ifndef LV_LIBINPUT_XKB
#define LV_LIBINPUT_XKB 1
#endif
#ifndef LV_USE_OPENGLES
#if !defined(NON_AMD64_BUILD) && !defined(_MSC_VER) && !defined(_WIN32)
#define LV_USE_OPENGLES 1
#endif
#endif
#define LV_USE_FREETYPE 1
#define LV_FREETYPE_USE_LVGL_PORT 0
#define LV_FREETYPE_CACHE_FT_GLYPH_CNT 64
#define LV_USE_FONT_MANAGER 1
#define LV_USE_DRAW_SW_COMPLEX_GRADIENTS 1
#define LV_USE_GESTURE_RECOGNITION 1
#define LV_DISABLE_API_MAPPING 1
#endif /* LV_TEST_CONF_FULL_H */

Some files were not shown because too many files have changed in this diff Show More