fix: 支持smoke 测试用例

默认只运行smoke测试用例,如需要运行全量测试用例,
请在target_config.h中添加配置项: LOS_KERNEL_TEST_FULL
或在config.json中配置enable_ohos_kernel_liteos_m_test_full
Close #I424RX

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I1f72a7666bf30631090e3e00faf6c432105dec17
This commit is contained in:
zhushengle 2021-07-28 20:22:58 +08:00
parent 6b732ca351
commit 3ad5942301
24 changed files with 811 additions and 837 deletions

View File

@ -1,20 +1,28 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
import("//build/lite/config/component/lite_component.gni") import("//build/lite/config/component/lite_component.gni")
declare_args() {
enable_ohos_kernel_liteos_m_test_full = false
}
config("include") { config("include") {
defines = []
include_dirs = [ include_dirs = [
"include", "include",
"//kernel/liteos_m/kernel/include", "//kernel/liteos_m/kernel/include",
"//kernel/liteos_m/kernel/arch/include", "//kernel/liteos_m/kernel/arch/include",
"//kernel/liteos_m/components/cpup", "//kernel/liteos_m/components/cpup",
] ]
if (enable_ohos_kernel_liteos_m_test_full == true) {
defines += [ "LOS_KERNEL_TEST_FULL=1" ]
}
} }
static_library("test_init") { static_library("test_init") {
sources = [ sources = [
"src/osTest.c",
"src/iCunit.c", "src/iCunit.c",
"src/osTest.c",
] ]
configs += [ ":include" ] configs += [ ":include" ]
@ -31,6 +39,7 @@ lite_component("test") {
"sample/kernel/sem:test_sem", "sample/kernel/sem:test_sem",
"sample/kernel/swtmr:test_swtmr", "sample/kernel/swtmr:test_swtmr",
"sample/kernel/task:test_task", "sample/kernel/task:test_task",
#"sample/kernel/tickless:test_tickless", #"sample/kernel/tickless:test_tickless",
] ]
} }

View File

@ -68,8 +68,8 @@ extern "C" {
#define LITEOS_BASE_TEST 1 #define LITEOS_BASE_TEST 1
#ifndef LOS_KERNEL_TEST_NOT_SMOKE #ifndef LOS_KERNEL_TEST_FULL
#define LOS_KERNEL_TEST_NOT_SMOKE 1 #define LOS_KERNEL_TEST_FULL 0
#endif #endif
#define LOS_KERNEL_CORE_TASK_TEST 1 #define LOS_KERNEL_CORE_TASK_TEST 1
#define LOS_KERNEL_IPC_MUX_TEST 1 #define LOS_KERNEL_IPC_MUX_TEST 1

View File

@ -1,8 +1,8 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_event") { static_library("test_event") {
sources = [ sources = [
"It_los_event.c",
"It_los_event_001.c", "It_los_event_001.c",
"It_los_event_002.c", "It_los_event_002.c",
"It_los_event_003.c", "It_los_event_003.c",
@ -45,7 +45,6 @@ static_library("test_event") {
"It_los_event_041.c", "It_los_event_041.c",
"It_los_event_042.c", "It_los_event_042.c",
"It_los_event_043.c", "It_los_event_043.c",
"It_los_event.c",
] ]
configs += [ "//kernel/liteos_m/testsuits:include" ] configs += [ "//kernel/liteos_m/testsuits:include" ]

View File

@ -38,8 +38,6 @@ EVENT_CB_S g_pevent;
VOID ItSuiteLosEvent() VOID ItSuiteLosEvent()
{ {
ItLosEvent001(); ItLosEvent001();
ItLosEvent002();
ItLosEvent003();
ItLosEvent004(); ItLosEvent004();
ItLosEvent005(); ItLosEvent005();
ItLosEvent006(); ItLosEvent006();
@ -47,42 +45,42 @@ VOID ItSuiteLosEvent()
ItLosEvent008(); ItLosEvent008();
ItLosEvent009(); ItLosEvent009();
ItLosEvent010(); ItLosEvent010();
ItLosEvent011();
ItLosEvent012();
ItLosEvent013(); ItLosEvent013();
ItLosEvent014(); ItLosEvent014();
ItLosEvent015();
ItLosEvent016(); ItLosEvent016();
ItLosEvent017(); ItLosEvent017();
ItLosEvent018(); ItLosEvent018();
ItLosEvent019();
ItLosEvent020();
ItLosEvent021(); ItLosEvent021();
ItLosEvent022(); ItLosEvent022();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosEvent023();
ItLosEvent024();
#endif
ItLosEvent026(); ItLosEvent026();
ItLosEvent027();
ItLosEvent028();
ItLosEvent029(); ItLosEvent029();
ItLosEvent030();
ItLosEvent031(); ItLosEvent031();
ItLosEvent032();
ItLosEvent033();
#if (LOS_KERNEL_TEST_NOT_SMOKE == 1)
ItLosEvent034();
#endif
ItLosEvent035(); ItLosEvent035();
ItLosEvent036(); ItLosEvent036();
ItLosEvent037(); ItLosEvent037();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosEvent038();
#endif
ItLosEvent039();
ItLosEvent040(); ItLosEvent040();
ItLosEvent041(); ItLosEvent041();
ItLosEvent042(); ItLosEvent042();
ItLosEvent043(); ItLosEvent043();
#if (LOS_KERNEL_TEST_FULL == 1)
ItLosEvent002();
ItLosEvent003();
ItLosEvent011();
ItLosEvent012();
ItLosEvent015();
ItLosEvent019();
ItLosEvent020();
ItLosEvent027();
ItLosEvent028();
ItLosEvent030();
ItLosEvent032();
ItLosEvent033();
ItLosEvent034();
ItLosEvent039();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosEvent023();
ItLosEvent024();
ItLosEvent038();
#endif
#endif
} }

View File

@ -1,8 +1,8 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_hwi") { static_library("test_hwi") {
sources = [ sources = [
"It_los_hwi.c",
"it_los_hwi_001.c", "it_los_hwi_001.c",
"it_los_hwi_002.c", "it_los_hwi_002.c",
"it_los_hwi_003.c", "it_los_hwi_003.c",
@ -37,7 +37,6 @@ static_library("test_hwi") {
"it_los_hwi_032.c", "it_los_hwi_032.c",
"it_los_hwi_033.c", "it_los_hwi_033.c",
"it_los_hwi_034.c", "it_los_hwi_034.c",
"It_los_hwi.c",
"llt_los_hwi_035.c", "llt_los_hwi_035.c",
] ]

View File

@ -1,7 +1,6 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_mem") { static_library("test_mem") {
sources = [ sources = [
"It_los_mem_001.c", "It_los_mem_001.c",
"It_los_mem_002.c", "It_los_mem_002.c",
@ -29,8 +28,8 @@ static_library("test_mem") {
"It_los_mem_038.c", "It_los_mem_038.c",
"It_los_mem_040.c", "It_los_mem_040.c",
"It_los_mem_045.c", "It_los_mem_045.c",
"it_los_mem.c",
"It_los_tick_001.c", "It_los_tick_001.c",
"it_los_mem.c",
] ]
configs += [ "//kernel/liteos_m/testsuits:include" ] configs += [ "//kernel/liteos_m/testsuits:include" ]
@ -38,6 +37,6 @@ static_library("test_mem") {
defines = [ defines = [
"LOS_RECORD_LR_CNT=3", "LOS_RECORD_LR_CNT=3",
"LOS_DLNK_NODE_HEAD_SIZE=0", "LOS_DLNK_NODE_HEAD_SIZE=0",
"MIN_DLNK_POOL_SIZE=0" "MIN_DLNK_POOL_SIZE=0",
] ]
} }

View File

@ -104,7 +104,9 @@ VOID ItSuiteLosMem(void)
#endif #endif
ItLosMem040(); ItLosMem040();
ItLosMem045(); ItLosMem045();
ItLosTick001();
#if (LOS_KERNEL_TEST_FULL == 1)
ItLosTick001();
#endif
MemEnd(); MemEnd();
} }

View File

@ -1,7 +1,6 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_mux") { static_library("test_mux") {
sources = [ sources = [
"It_los_mutex_001.c", "It_los_mutex_001.c",
"It_los_mutex_002.c", "It_los_mutex_002.c",

View File

@ -43,39 +43,38 @@ VOID ItSuiteLosMux(void)
ItLosMux004(); ItLosMux004();
ItLosMux005(); ItLosMux005();
ItLosMux006(); ItLosMux006();
ItLosMux007();
ItLosMux008(); ItLosMux008();
ItLosMux009(); ItLosMux009();
ItLosMux010();
ItLosMux011();
ItLosMux012();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosMux013();
#endif
ItLosMux014();
ItLosMux015();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosMux016();
ItLosMux017();
#endif
ItLosMux018(); ItLosMux018();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosMux019();
#endif
#ifndef __RISC_V__
ItLosMux020();
#endif
ItLosMux021();
ItLosMux022();
ItLosMux023(); ItLosMux023();
ItLosMux024();
ItLosMux025();
ItLosMux026(); ItLosMux026();
ItLosMux027(); ItLosMux027();
ItLosMux029(); ItLosMux029();
ItLosMux030();
ItLosMux031(); ItLosMux031();
#if (LOS_KERNEL_TEST_FULL == 1)
ItLosMux007();
ItLosMux010();
ItLosMux011();
ItLosMux012();
ItLosMux014();
ItLosMux015();
ItLosMux021();
ItLosMux022();
ItLosMux024();
ItLosMux025();
ItLosMux030();
ItLosMux033(); ItLosMux033();
ItLosMux034(); ItLosMux034();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosMux013();
ItLosMux016();
ItLosMux017();
ItLosMux019();
#ifndef __RISC_V__
ItLosMux020();
#endif
#endif
#endif
} }

View File

@ -1,8 +1,8 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_queue") { static_library("test_queue") {
sources = [ sources = [
"It_los_queue.c",
"It_los_queue_001.c", "It_los_queue_001.c",
"It_los_queue_002.c", "It_los_queue_002.c",
"It_los_queue_003.c", "It_los_queue_003.c",
@ -100,7 +100,6 @@ static_library("test_queue") {
"It_los_queue_109.c", "It_los_queue_109.c",
"It_los_queue_110.c", "It_los_queue_110.c",
"It_los_queue_114.c", "It_los_queue_114.c",
"It_los_queue.c",
"It_los_queue_head_001.c", "It_los_queue_head_001.c",
"It_los_queue_head_002.c", "It_los_queue_head_002.c",
"It_los_queue_head_003.c", "It_los_queue_head_003.c",
@ -136,9 +135,8 @@ static_library("test_queue") {
"It_los_queue_head_040.c", "It_los_queue_head_040.c",
"It_los_queue_head_041.c", "It_los_queue_head_041.c",
"It_los_queue_head_042.c", "It_los_queue_head_042.c",
"Llt_los_queue_001.c",
"LLt_los_queue_003.c", "LLt_los_queue_003.c",
"Llt_los_queue_001.c",
] ]
configs += [ "//kernel/liteos_m/testsuits:include" ] configs += [ "//kernel/liteos_m/testsuits:include" ]

View File

@ -75,14 +75,6 @@ VOID ItSuiteLosQueue(VOID)
ItLosQueue041(); ItLosQueue041();
ItLosQueue042(); ItLosQueue042();
ItLosQueue043(); ItLosQueue043();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosQueue044();
ItLosQueue045();
ItLosQueue046();
ItLosQueue047();
ItLosQueue048();
ItLosQueue050();
#endif
ItLosQueue051(); ItLosQueue051();
ItLosQueue052(); ItLosQueue052();
ItLosQueue053(); ItLosQueue053();
@ -123,10 +115,6 @@ VOID ItSuiteLosQueue(VOID)
ItLosQueue104(); ItLosQueue104();
ItLosQueue106(); ItLosQueue106();
ItLosQueue107(); ItLosQueue107();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosQueue108();
#endif
ItLosQueue109();
ItLosQueue114(); ItLosQueue114();
ItLosQueueHead001(); ItLosQueueHead001();
ItLosQueueHead002(); ItLosQueueHead002();
@ -164,11 +152,22 @@ VOID ItSuiteLosQueue(VOID)
ItLosQueueHead041(); ItLosQueueHead041();
ItLosQueueHead042(); ItLosQueueHead042();
#if (LOS_KERNEL_TEST_FULL == 1)
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosQueue044();
ItLosQueue045();
ItLosQueue046();
ItLosQueue047();
ItLosQueue048();
ItLosQueue050();
ItLosQueue108();
#endif
ItLosQueue073();
ItLosQueue109();
#if (LOSCFG_TEST_LLT == 1) #if (LOSCFG_TEST_LLT == 1)
LlTLosQueue001(); LlTLosQueue001();
LltLosQueue003(); LltLosQueue003();
#endif #endif
ItLosQueue073(); ItLosQueue073();
ItLosQueue091(); ItLosQueue091();
ItLosQueue092(); ItLosQueue092();
@ -176,4 +175,5 @@ VOID ItSuiteLosQueue(VOID)
ItLosQueue094(); ItLosQueue094();
ItLosQueue095(); ItLosQueue095();
ItLosQueue110(); ItLosQueue110();
#endif
} }

View File

@ -1,8 +1,8 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_sem") { static_library("test_sem") {
sources = [ sources = [
"It_los_sem.c",
"It_los_sem_001.c", "It_los_sem_001.c",
"It_los_sem_002.c", "It_los_sem_002.c",
"It_los_sem_003.c", "It_los_sem_003.c",
@ -46,7 +46,6 @@ static_library("test_sem") {
"it_los_sem_041.c", "it_los_sem_041.c",
"it_los_sem_042.c", "it_los_sem_042.c",
"it_los_sem_043.c", "it_los_sem_043.c",
"It_los_sem.c",
] ]
configs += [ "//kernel/liteos_m/testsuits:include" ] configs += [ "//kernel/liteos_m/testsuits:include" ]

View File

@ -43,7 +43,7 @@ VOID ItSuiteLosSem(void)
ItLosSem007(); ItLosSem007();
ItLosSem008(); ItLosSem008();
ItLosSem009(); ItLosSem009();
ItLosSem012(); ItLosSem011();
ItLosSem013(); ItLosSem013();
ItLosSem014(); ItLosSem014();
ItLosSem015(); ItLosSem015();
@ -54,33 +54,34 @@ VOID ItSuiteLosSem(void)
ItLosSem020(); ItLosSem020();
ItLosSem021(); ItLosSem021();
ItLosSem022(); ItLosSem022();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSem023();
#endif
ItLosSem024(); ItLosSem024();
ItLosSem025(); ItLosSem025();
ItLosSem026(); ItLosSem026();
ItLosSem027();
ItLosSem028(); ItLosSem028();
ItLosSem029(); ItLosSem029();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSem030();
#endif
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == YES) #if (LOSCFG_BASE_CORE_SWTMR_ALIGN == YES)
ItLosSem031(); ItLosSem031();
#endif #endif
ItLosSem032(); ItLosSem032();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSem033();
#endif
ItLosSem034();
ItLosSem035();
ItLosSem036();
ItLosSem037();
ItLosSem038(); ItLosSem038();
ItLosSem039();
ItLosSem040(); ItLosSem040();
ItLosSem041(); ItLosSem041();
ItLosSem042(); ItLosSem042();
ItLosSem043(); ItLosSem043();
#if (LOS_KERNEL_TEST_FULL == 1)
ItLosSem012();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSem010();
ItLosSem023();
ItLosSem030();
ItLosSem033();
#endif
ItLosSem027();
ItLosSem034();
ItLosSem035();
ItLosSem036();
ItLosSem037();
ItLosSem039();
#endif
} }

View File

@ -42,12 +42,6 @@ static UINT32 Testcase(VOID)
LOS_TaskLock(); LOS_TaskLock();
ret = LOS_SemPend(g_usSemID, LOS_WAIT_FOREVER);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_SemPend(g_usSemID, LOS_WAIT_FOREVER);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_SemPend(g_usSemID, LOS_WAIT_FOREVER); ret = LOS_SemPend(g_usSemID, LOS_WAIT_FOREVER);
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_SEM_PEND_IN_LOCK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_SEM_PEND_IN_LOCK, ret, EXIT);

View File

@ -1,8 +1,8 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_swtmr") { static_library("test_swtmr") {
sources = [ sources = [
"It_los_swtmr.c",
"It_los_swtmr_001.c", "It_los_swtmr_001.c",
"It_los_swtmr_002.c", "It_los_swtmr_002.c",
"It_los_swtmr_003.c", "It_los_swtmr_003.c",
@ -110,7 +110,6 @@ static_library("test_swtmr") {
"It_los_swtmr_Align_029.c", "It_los_swtmr_Align_029.c",
"It_los_swtmr_Align_030.c", "It_los_swtmr_Align_030.c",
"It_los_swtmr_Align_031.c", "It_los_swtmr_Align_031.c",
"It_los_swtmr.c",
"It_los_swtmr_Delay_001.c", "It_los_swtmr_Delay_001.c",
"It_los_swtmr_Delay_003.c", "It_los_swtmr_Delay_003.c",
"It_los_swtmr_Delay_004.c", "It_los_swtmr_Delay_004.c",

View File

@ -60,37 +60,27 @@ VOID ItSuiteLosSwtmr(void)
ItLosSwtmr019(); ItLosSwtmr019();
ItLosSwtmr020(); ItLosSwtmr020();
ItLosSwtmr021(); ItLosSwtmr021();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSwtmr022();
ItLosSwtmr023();
#endif
ItLosSwtmr024(); ItLosSwtmr024();
ItLosSwtmr025();
#if (LOS_KERNEL_TEST_NOT_SMOKE == 1)
ItLosSwtmr026();
#endif
ItLosSwtmr027(); ItLosSwtmr027();
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
ItLosSwtmrAlign001();
ItLosSwtmrAlign002();
ItLosSwtmrAlign003();
ItLosSwtmrAlign004();
#endif
#if (LOS_KERNEL_TEST_FULL == 1)
ItLosSwtmr025();
ItLosSwtmr026();
ItLosSwtmr029(); ItLosSwtmr029();
ItLosSwtmr030(); ItLosSwtmr030();
ItLosSwtmr031(); ItLosSwtmr031();
ItLosSwtmr032(); ItLosSwtmr032();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSwtmr033();
ItLosSwtmr034();
#endif
ItLosSwtmr035(); ItLosSwtmr035();
ItLosSwtmr036(); ItLosSwtmr036();
ItLosSwtmr037(); ItLosSwtmr037();
ItLosSwtmr038(); ItLosSwtmr038();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSwtmr039();
ItLosSwtmr040();
ItLosSwtmr041();
#endif
ItLosSwtmr042(); ItLosSwtmr042();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSwtmr043();
#endif
ItLosSwtmr044(); ItLosSwtmr044();
ItLosSwtmr045(); ItLosSwtmr045();
ItLosSwtmr046(); ItLosSwtmr046();
@ -111,34 +101,20 @@ VOID ItSuiteLosSwtmr(void)
ItLosSwtmr061(); ItLosSwtmr061();
ItLosSwtmr062(); ItLosSwtmr062();
ItLosSwtmr063(); ItLosSwtmr063();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSwtmr064();
ItLosSwtmr065();
#endif
ItLosSwtmr066(); ItLosSwtmr066();
ItLosSwtmr067(); ItLosSwtmr067();
#if (LOS_KERNEL_TEST_NOT_SMOKE == 1)
ItLosSwtmr068(); ItLosSwtmr068();
ItLosSwtmr069(); ItLosSwtmr069();
#endif
ItLosSwtmr071(); ItLosSwtmr071();
ItLosSwtmr072(); ItLosSwtmr072();
ItLosSwtmr073(); ItLosSwtmr073();
#if (LOS_KERNEL_TEST_NOT_SMOKE == 1)
ItLosSwtmr074(); ItLosSwtmr074();
#endif
ItLosSwtmr075(); ItLosSwtmr075();
ItLosSwtmr076(); ItLosSwtmr076();
ItLosSwtmr077(); ItLosSwtmr077();
ItLosSwtmr078(); ItLosSwtmr078();
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1) #if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
ItLosSwtmrAlign001();
ItLosSwtmrAlign002();
ItLosSwtmrAlign003();
ItLosSwtmrAlign004();
#if (LOS_KERNEL_TEST_NOT_SMOKE == 1)
ItLosSwtmrAlign005(); ItLosSwtmrAlign005();
#endif
ItLosSwtmrAlign006(); ItLosSwtmrAlign006();
ItLosSwtmrAlign007(); ItLosSwtmrAlign007();
ItLosSwtmrAlign008(); ItLosSwtmrAlign008();
@ -170,5 +146,19 @@ VOID ItSuiteLosSwtmr(void)
ItLosSwtmrDelay003(); ItLosSwtmrDelay003();
ItLosSwtmrDelay004(); ItLosSwtmrDelay004();
ItLosSwtmrDelay005(); ItLosSwtmrDelay005();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosSwtmr022();
ItLosSwtmr023();
ItLosSwtmr033();
ItLosSwtmr034();
ItLosSwtmr039();
ItLosSwtmr040();
ItLosSwtmr041();
ItLosSwtmr043();
ItLosSwtmr064();
ItLosSwtmr065();
#endif
#endif
} }

View File

@ -64,7 +64,9 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
// 2, Here, assert that g_testCount is equal to this . // 2, Here, assert that g_testCount is equal to this .
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); if (g_testCount < 2) {
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to this
}
ret = LOS_SwtmrDelete(swTmrID); ret = LOS_SwtmrDelete(swTmrID);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
@ -73,7 +75,9 @@ static UINT32 Testcase(VOID)
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
// 2, Here, assert that g_testCount is equal to this . // 2, Here, assert that g_testCount is equal to this .
ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); if (g_testCount < 2) {
ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); // 2, Here, assert that g_testCount is equal to this
}
return LOS_OK; return LOS_OK;
@ -84,7 +88,7 @@ EXIT:
return LOS_OK; return LOS_OK;
} }
VOID ItLosSwtmr002() // IT_Layer_ModuleORFeature_No VOID ItLosSwtmr002(VOID) // IT_Layer_ModuleORFeature_No
{ {
TEST_ADD_CASE("ItLosSwtmr002", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL1, TEST_FUNCTION); TEST_ADD_CASE("ItLosSwtmr002", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL1, TEST_FUNCTION);
} }

View File

@ -64,8 +64,9 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
// 2, Here, assert that g_testCount is equal to this . // 2, Here, assert that g_testCount is equal to this .
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); if (g_testCount < 2) {
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to this
}
EXIT: EXIT:
ret = LOS_SwtmrDelete(swTmrID); ret = LOS_SwtmrDelete(swTmrID);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
@ -73,7 +74,7 @@ EXIT:
return LOS_OK; return LOS_OK;
} }
VOID ItLosSwtmr013() // IT_Layer_ModuleORFeature_No VOID ItLosSwtmr013(VOID) // IT_Layer_ModuleORFeature_No
{ {
TEST_ADD_CASE("ItLosSwtmr013", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL2, TEST_FUNCTION); TEST_ADD_CASE("ItLosSwtmr013", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL2, TEST_FUNCTION);
} }

View File

@ -67,8 +67,9 @@ static UINT32 Testcase(VOID)
ret = LOS_TaskDelay(10); // 10, set delay time. ret = LOS_TaskDelay(10); // 10, set delay time.
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
// 2, Here, assert that g_testCount is equal to this . // 2, Here, assert that g_testCount is equal to this .
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); if (g_testCount < 2) {
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to this
}
EXIT: EXIT:
ret = LOS_SwtmrDelete(swTmrID); ret = LOS_SwtmrDelete(swTmrID);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
@ -76,7 +77,7 @@ EXIT:
return LOS_OK; return LOS_OK;
} }
VOID ItLosSwtmr016() // IT_Layer_ModuleORFeature_No VOID ItLosSwtmr016(VOID) // IT_Layer_ModuleORFeature_No
{ {
TEST_ADD_CASE("ItLosSwtmr016", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL2, TEST_FUNCTION); TEST_ADD_CASE("ItLosSwtmr016", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL2, TEST_FUNCTION);
} }

View File

@ -72,8 +72,9 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
// 2, Here, assert that g_testCount is equal to this . // 2, Here, assert that g_testCount is equal to this .
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); if (g_testCount < 2) {
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to this
}
EXIT: EXIT:
ret = LOS_SwtmrDelete(swTmrID); ret = LOS_SwtmrDelete(swTmrID);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
@ -81,7 +82,7 @@ EXIT:
return LOS_OK; return LOS_OK;
} }
VOID ItLosSwtmr021() // IT_Layer_ModuleORFeature_No VOID ItLosSwtmr021(VOID) // IT_Layer_ModuleORFeature_No
{ {
TEST_ADD_CASE("ItLosSwtmr021", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL2, TEST_FUNCTION); TEST_ADD_CASE("ItLosSwtmr021", Testcase, TEST_LOS, TEST_SWTMR, TEST_LEVEL2, TEST_FUNCTION);
} }

View File

@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
ret = LOS_SwtmrStart(swTmrID); ret = LOS_SwtmrStart(swTmrID);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_TaskDelay(4); // 4, set delay time. ret = LOS_TaskDelay(5); // 5, set delay time.
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT); ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT); ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);

View File

@ -1,7 +1,6 @@
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. # Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
static_library("test_task") { static_library("test_task") {
sources = [ sources = [
"It_los_task.c", "It_los_task.c",
"It_los_task_001.c", "It_los_task_001.c",

View File

@ -72,65 +72,45 @@ VOID ItSuiteLosTask()
ItLosTask036(); ItLosTask036();
ItLosTask037(); ItLosTask037();
ItLosTask038(); ItLosTask038();
ItLosTask039();
ItLosTask040();
ItLosTask041(); ItLosTask041();
ItLosTask042(); ItLosTask042();
ItLosTask043();
ItLosTask046(); ItLosTask046();
ItLosTask047(); ItLosTask047();
ItLosTask048();
ItLosTask049(); ItLosTask049();
ItLosTask050(); ItLosTask050();
ItLosTask051();
ItLosTask052();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask053();
ItLosTask054();
#endif
ItLosTask055(); ItLosTask055();
ItLosTask056();
ItLosTask057(); ItLosTask057();
ItLosTask058(); ItLosTask058();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask059();
#endif
ItLosTask060(); ItLosTask060();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask061();
#endif
ItLosTask062(); ItLosTask062();
ItLosTask063();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask064();
#endif
ItLosTask065(); ItLosTask065();
ItLosTask066(); ItLosTask066();
ItLosTask067(); ItLosTask067();
ItLosTask068(); ItLosTask068();
ItLosTask069(); ItLosTask069();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask070();
#endif
ItLosTask071(); ItLosTask071();
ItLosTask072(); ItLosTask072();
ItLosTask073(); ItLosTask073();
ItLosTask074(); ItLosTask074();
ItLosTask075();
ItLosTask076(); ItLosTask076();
ItLosTask077(); ItLosTask077();
ItLosTask078(); ItLosTask078();
#if (LOS_KERNEL_TEST_FULL == 1)
ItLosTask039();
ItLosTask040();
ItLosTask043();
ItLosTask048();
ItLosTask051();
ItLosTask052();
ItLosTask056();
ItLosTask063();
ItLosTask075();
ItLosTask079(); ItLosTask079();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask080();
#endif
ItLosTask081(); ItLosTask081();
ItLosTask082(); ItLosTask082();
ItLosTask083(); ItLosTask083();
ItLosTask085(); ItLosTask085();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask086();
#endif
ItLosTask087(); ItLosTask087();
ItLosTask088(); ItLosTask088();
ItLosTask089(); ItLosTask089();
@ -144,15 +124,9 @@ VOID ItSuiteLosTask()
ItLosTask099(); ItLosTask099();
ItLosTask100(); ItLosTask100();
ItLosTask101(); ItLosTask101();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask102();
#endif
ItLosTask103(); ItLosTask103();
ItLosTask104(); ItLosTask104();
ItLosTask105(); ItLosTask105();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask106();
#endif
ItLosTask107(); ItLosTask107();
ItLosTask108(); ItLosTask108();
ItLosTask109(); ItLosTask109();
@ -160,13 +134,22 @@ VOID ItSuiteLosTask()
ItLosTask111(); ItLosTask111();
ItLosTask112(); ItLosTask112();
ItLosTask113(); ItLosTask113();
#if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask114();
#endif
ItLosTask115(); ItLosTask115();
ItLosTask116(); ItLosTask116();
#if (LOS_KERNEL_HWI_TEST == 1) #if (LOS_KERNEL_HWI_TEST == 1)
ItLosTask053();
ItLosTask054();
ItLosTask059();
ItLosTask061();
ItLosTask064();
ItLosTask070();
ItLosTask080();
ItLosTask086();
ItLosTask102();
ItLosTask106();
ItLosTask114();
ItLosTask117(); ItLosTask117();
#endif #endif
#endif
} }

View File

@ -32,33 +32,33 @@ import("//test/xts/tools/lite/build/suite_lite.gni")
hctest_suite("PosixTest") { hctest_suite("PosixTest") {
suite_name = "acts" suite_name = "acts"
sources = [ sources = [
"src/mqueue/mqueue_func_test.c", "src/ctype/ctype_func_test.c",
"src/pthread/pthread_cond_func_test.c",
"src/semaphore/semaphore_func_test.c",
"src/ctype/isdigit_test.c", "src/ctype/isdigit_test.c",
"src/ctype/islower_test.c", "src/ctype/islower_test.c",
"src/ctype/isxdigit_test.c", "src/ctype/isxdigit_test.c",
"src/ctype/ctype_func_test.c",
"src/ctype/tolower_test.c", "src/ctype/tolower_test.c",
"src/ctype/toupper_test.c", "src/ctype/toupper_test.c",
"src/errno/strerror_test.c",
"src/fs/posix_fs_func_test.c",
"src/math/math_func_test.c", "src/math/math_func_test.c",
"src/mqueue/mqueue_func_test.c",
"src/pthread/pthread_cond_func_test.c",
"src/regex/regex_func_test.c", "src/regex/regex_func_test.c",
"src/semaphore/semaphore_func_test.c",
"src/stdarg/stdarg_func_test.c", "src/stdarg/stdarg_func_test.c",
"src/stdlib/atoi_test.c", "src/stdlib/atoi_test.c",
"src/stdlib/atoll_test.c",
"src/stdlib/atol_test.c", "src/stdlib/atol_test.c",
"src/stdlib/atoll_test.c",
"src/stdlib/strtol_test.c", "src/stdlib/strtol_test.c",
"src/stdlib/strtoull_test.c",
"src/stdlib/strtoul_test.c", "src/stdlib/strtoul_test.c",
"src/stdlib/strtoull_test.c",
"src/string/memory_func_test.c", "src/string/memory_func_test.c",
"src/string/strchr_test.c",
"src/string/string_func_test_01.c", "src/string/string_func_test_01.c",
"src/string/string_func_test_02.c", "src/string/string_func_test_02.c",
"src/string/strchr_test.c", "src/string/string_func_test_03.c",
"src/string/strstr_test.c", "src/string/strstr_test.c",
"src/time/time_func_test_01.c", "src/time/time_func_test_01.c",
"src/fs/posix_fs_func_test.c",
"src/string/string_func_test_03.c",
"src/errno/strerror_test.c",
] ]
include_dirs = [ include_dirs = [