ci(test): make test_style faster

This commit is contained in:
Gabor Kiss-Vamosi
2023-02-27 09:50:08 +01:00
parent 206f0f168a
commit 426739d060

View File

@@ -11,6 +11,7 @@ static void obj_set_height_helper(void * obj, int32_t height)
void test_gradient_vertical_misalignment(void)
{
/* Tests gradient caching as the height of widget changes.*/
lv_obj_t * obj = lv_obj_create(lv_scr_act());
lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0);
lv_obj_set_style_bg_grad_color(obj, lv_color_hex(0xff0000), 0);
@@ -26,16 +27,16 @@ void test_gradient_vertical_misalignment(void)
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_exec_cb(&a, obj_set_height_helper);
lv_anim_set_time(&a, 3000);
lv_anim_set_playback_time(&a, 3000);
lv_anim_set_time(&a, 1000);
lv_anim_set_playback_time(&a, 1000);
lv_anim_set_repeat_count(&a, 100);
lv_anim_set_values(&a, 0, 300);
lv_anim_start(&a);
uint32_t i;
for(i = 0; i < 1000; i++) {
for(i = 0; i < 100; i++) {
lv_timer_handler();
lv_tick_inc(100);
lv_tick_inc(73); /*Use a not round number to cover more anim states */
usleep(1000);
}
}