Merge pull request #4974 from Guozhanxin/ci_timer
添加更多的测试用例到 Autotest CI
This commit is contained in:
commit
c80031d9d2
|
@ -13,6 +13,8 @@ jobs:
|
||||||
legs:
|
legs:
|
||||||
- {UTEST: "kernel/mem", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/mem.conf", SD_FILE: "sd.bin"}
|
- {UTEST: "kernel/mem", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/mem.conf", SD_FILE: "sd.bin"}
|
||||||
- {UTEST: "kernel/ipc", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/ipc.conf", SD_FILE: "sd.bin"}
|
- {UTEST: "kernel/ipc", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/ipc.conf", SD_FILE: "sd.bin"}
|
||||||
|
- {UTEST: "kernel/irq", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/irq.conf", SD_FILE: "sd.bin"}
|
||||||
|
- {UTEST: "kernel/timer", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/timer.conf", SD_FILE: "sd.bin"}
|
||||||
- {UTEST: "components/utest", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "utest_self/self.conf", SD_FILE: "sd.bin"}
|
- {UTEST: "components/utest", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "utest_self/self.conf", SD_FILE: "sd.bin"}
|
||||||
- {UTEST: "kernel/mem/riscv64", RTT_BSP: "bsp/qemu-riscv-virt64", QEMU_ARCH: "riscv64", QEMU_MACHINE: "virt", CONFIG_FILE: "kernel/mem.conf", SD_FILE: "None"}
|
- {UTEST: "kernel/mem/riscv64", RTT_BSP: "bsp/qemu-riscv-virt64", QEMU_ARCH: "riscv64", QEMU_MACHINE: "virt", CONFIG_FILE: "kernel/mem.conf", SD_FILE: "None"}
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -54,8 +54,8 @@ static struct utest local_utest = {UTEST_PASSED, 0, 0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TC_FAIL_LIST_SIZE (RT_ALIGN(tc_num, 8) / 8)
|
#define TC_FAIL_LIST_SIZE (RT_ALIGN(tc_num, 8) / 8)
|
||||||
#define TC_FAIL_LIST_MARK_FAILED(index) (tc_fail_list[RT_ALIGN(index, 8) / 8] |= (1UL << (index % 8)))
|
#define TC_FAIL_LIST_MARK_FAILED(index) (tc_fail_list[index / 8] |= (1UL << (index % 8)))
|
||||||
#define TC_FAIL_LIST_IS_FAILED(index) (tc_fail_list[RT_ALIGN(index, 8) / 8] & (1UL << (index % 8)))
|
#define TC_FAIL_LIST_IS_FAILED(index) (tc_fail_list[index / 8] & (1UL << (index % 8)))
|
||||||
|
|
||||||
void utest_log_lv_set(rt_uint8_t lv)
|
void utest_log_lv_set(rt_uint8_t lv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
CONFIG_UTEST_IRQ_TC=y
|
||||||
|
# dependencies
|
|
@ -0,0 +1,4 @@
|
||||||
|
CONFIG_UTEST_TIMER_TC=y
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
CONFIG_RT_USING_TIMER_SOFT=y
|
|
@ -103,7 +103,7 @@ static void test_static_timer_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for timerout */
|
/* wait for timerout */
|
||||||
rt_thread_mdelay(time_out + 5);
|
rt_thread_delay(time_out + 1);
|
||||||
|
|
||||||
/* detach timer */
|
/* detach timer */
|
||||||
result = rt_timer_detach(&timer.static_timer);
|
result = rt_timer_detach(&timer.static_timer);
|
||||||
|
@ -145,7 +145,7 @@ static void test_static_timer_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for timerout */
|
/* wait for timerout */
|
||||||
rt_thread_mdelay(time_out + 5);
|
rt_thread_delay(time_out + 1);
|
||||||
|
|
||||||
/* detach timer */
|
/* detach timer */
|
||||||
result = rt_timer_detach(&timer.static_timer);
|
result = rt_timer_detach(&timer.static_timer);
|
||||||
|
@ -238,7 +238,7 @@ static void test_static_timer_control(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rt_thread_mdelay(set_data + 5);
|
rt_thread_delay(set_data + 1);
|
||||||
|
|
||||||
/* detach timer */
|
/* detach timer */
|
||||||
result = rt_timer_detach(&timer.static_timer);
|
result = rt_timer_detach(&timer.static_timer);
|
||||||
|
@ -329,7 +329,7 @@ static void test_dynamic_timer_create(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for timerout */
|
/* wait for timerout */
|
||||||
rt_thread_mdelay(time_out + 5);
|
rt_thread_delay(time_out + 1);
|
||||||
|
|
||||||
/* detach timer */
|
/* detach timer */
|
||||||
result = rt_timer_delete(timer.dynamic_timer);
|
result = rt_timer_delete(timer.dynamic_timer);
|
||||||
|
@ -370,7 +370,7 @@ static void test_dynamic_timer_create(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for timerout */
|
/* wait for timerout */
|
||||||
rt_thread_mdelay(time_out + 5);
|
rt_thread_delay(time_out + 1);
|
||||||
|
|
||||||
/* detach timer */
|
/* detach timer */
|
||||||
result = rt_timer_delete(timer.dynamic_timer);
|
result = rt_timer_delete(timer.dynamic_timer);
|
||||||
|
@ -462,7 +462,7 @@ static void test_dynamic_timer_control(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rt_thread_mdelay(set_data + 5);
|
rt_thread_delay(set_data + 1);
|
||||||
|
|
||||||
/* detach timer */
|
/* detach timer */
|
||||||
result = rt_timer_delete(timer.dynamic_timer);
|
result = rt_timer_delete(timer.dynamic_timer);
|
||||||
|
|
Loading…
Reference in New Issue