ci(mem): make sys/def heap tests work correctly with the new lv_conf.h settings

This commit is contained in:
Gabor Kiss-Vamosi
2022-07-25 14:37:41 +02:00
parent 17730c276c
commit efa34d00d7
2 changed files with 20 additions and 5 deletions
+19 -4
View File
@@ -20,18 +20,33 @@ extern "C" {
* DEFINES
*********************/
#ifdef LVGL_CI_USING_SYS_HEAP
#define LV_STDLIB_INCLUDE <stdlib.h>
#define LV_MALLOC malloc
#define LV_REALLOC realloc
#define LV_FREE free
#define LV_MEMSET memset
#define LV_MEMCPY memcpy
#endif
#ifdef LVGL_CI_USING_DEF_HEAP
#define LV_MALLOC lv_malloc_builtin
#define LV_REALLOC lv_realloc_builtin
#define LV_FREE lv_free_builtin
#define LV_MEMSET lv_memset_builtin
#define LV_MEMCPY lv_memcpy_builtin
#endif
void lv_test_assert_fail(void);
#define LV_ASSERT_HANDLER lv_test_assert_fail();
/**********************
* TYPEDEFS
**********************/
uint32_t custom_tick_get(void);
#define LV_TICK_CUSTOM_SYS_TIME_EXPR custom_tick_get()
typedef void * lv_user_data_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
+1 -1
View File
@@ -16,7 +16,7 @@ void tearDown(void)
/* #3324 */
void test_mem_buf_realloc(void)
{
#if LV_USE_BUILTIN_MALLOC
#ifdef LVGL_CI_USING_DEF_HEAP
void * buf1 = lv_malloc(20);
void * buf2 = lv_realloc(buf1, LV_MEM_SIZE + 16384);
TEST_ASSERT_NULL(buf2);