Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
41476310
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
41476310
编写于
3月 29, 2021
作者:
O
openharmony_ci
提交者:
Gitee
3月 29, 2021
浏览文件
操作
浏览文件
下载
差异文件
!82 【轻量级 PR】:解除对内核的依赖_part4
Merge pull request !82 from zhouhouxin/N/A
上级
29d8a8c4
2d1bd448
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
34 deletion
+34
-34
distributed_schedule_lite/samgr_hal/src/sendsharerequest_func_test.c
..._schedule_lite/samgr_hal/src/sendsharerequest_func_test.c
+4
-4
distributed_schedule_lite/samgr_hal/src/service_func_test.c
distributed_schedule_lite/samgr_hal/src/service_func_test.c
+3
-3
distributed_schedule_lite/samgr_hal/src/taskpool_notask_func_test.c
...d_schedule_lite/samgr_hal/src/taskpool_notask_func_test.c
+2
-2
distributed_schedule_lite/samgr_hal/src/taskpool_sharedtask_func_test.c
...hedule_lite/samgr_hal/src/taskpool_sharedtask_func_test.c
+8
-8
distributed_schedule_lite/samgr_hal/src/taskpool_singletask_func_test.c
...hedule_lite/samgr_hal/src/taskpool_singletask_func_test.c
+10
-10
distributed_schedule_lite/samgr_hal/src/taskpool_specifiedtask_func_test.c
...ule_lite/samgr_hal/src/taskpool_specifiedtask_func_test.c
+7
-7
未找到文件。
distributed_schedule_lite/samgr_hal/src/sendsharerequest_func_test.c
浏览文件 @
41476310
...
...
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include
<los_base.h>
#include
"cmsis_os.h"
#include "securec.h"
#include "hctest.h"
#include "samgr_lite.h"
...
...
@@ -357,7 +357,7 @@ LITE_TEST_SUIT(test, samgr, SendSharedRequestTestSuite);
static
BOOL
SendSharedRequestTestSuiteSetUp
(
void
)
{
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
return
TRUE
;
}
...
...
@@ -396,7 +396,7 @@ LITE_TEST_CASE(SendSharedRequestTestSuite, testSendSharedRequest0010, Function |
uint32
*
token
=
NULL
;
token
=
demoApi
->
SAMGR_SendSharedRequestProxy
(
&
feature
->
identity
,
&
request
,
token
,
DemoHandlerAndCheck
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
feature
->
featureCalledCount
,
1
);
TEST_ASSERT_EQUAL_INT
(
strcmp
(
feature
->
latestRequest
,
body
),
0
);
...
...
@@ -439,7 +439,7 @@ LITE_TEST_CASE(SendSharedRequestTestSuite, testSendSharedDirectRequest0010, Func
&
token
,
DemoHandlerAndCheck
);
TEST_ASSERT_EQUAL_INT
(
result
,
0
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
feature
->
featureCalledCount
,
0
);
ReleaseIUnknown
(
demoApi
);
...
...
distributed_schedule_lite/samgr_hal/src/service_func_test.c
浏览文件 @
41476310
...
...
@@ -14,7 +14,7 @@
*/
#include <string.h>
#include
<los_base.h>
#include
"cmsis_os.h"
#include "hctest.h"
#include "samgr_lite.h"
...
...
@@ -119,7 +119,7 @@ LITE_TEST_SUIT(test, samgr, ServiceTestSuite);
static
BOOL
ServiceTestSuiteSetUp
(
void
)
{
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
return
TRUE
;
}
...
...
@@ -263,7 +263,7 @@ LITE_TEST_CASE(ServiceTestSuite, testUnregisterService0060, Function | MediumTes
LITE_TEST_CASE
(
ServiceTestSuite
,
testBootstrap0010
,
Function
|
MediumTest
|
Level2
)
{
SAMGR_Bootstrap
();
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
SamgrLite
*
samgrLite
=
SAMGR_GetInstance
();
TEST_ASSERT_EQUAL_INT
(
TRUE
,
samgrLite
!=
NULL
);
...
...
distributed_schedule_lite/samgr_hal/src/taskpool_notask_func_test.c
浏览文件 @
41476310
...
...
@@ -16,7 +16,7 @@
* Create : 2020/04/19
*/
#include
<los_base.h>
#include
"cmsis_os.h"
#include "hctest.h"
#include "samgr_lite.h"
...
...
@@ -203,7 +203,7 @@ LITE_TEST_SUIT(distributedschedule, samgr, TaskPoolNoTaskFuncTestSuite);
static
BOOL
TaskPoolNoTaskFuncTestSuiteSetUp
(
void
)
{
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
return
TRUE
;
}
...
...
distributed_schedule_lite/samgr_hal/src/taskpool_sharedtask_func_test.c
浏览文件 @
41476310
...
...
@@ -17,7 +17,7 @@
*/
#include <stdlib.h>
#include
<los_base.h>
#include
"cmsis_os.h"
#include "securec.h"
#include "cmsis_os2.h"
#include "hctest.h"
...
...
@@ -281,7 +281,7 @@ LITE_TEST_SUIT(distributedschedule, taskpool, ShareTaskFuncTestSuite);
static
BOOL
ShareTaskFuncTestSuiteSetUp
(
void
)
{
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
return
TRUE
;
}
...
...
@@ -315,7 +315,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0010, Function | MediumTest
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
[
0
].
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
[
0
].
featureCalledCount
==
1
,
TRUE
);
// *************************** //
...
...
@@ -337,7 +337,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0010, Function | MediumTest
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
0
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
0
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -366,7 +366,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0020, Function | MediumTest
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
[
1
].
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
[
1
].
featureCalledCount
==
1
,
TRUE
);
// *************************** //
...
...
@@ -388,7 +388,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0020, Function | MediumTest
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
1
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
1
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -426,7 +426,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0030, Function | MediumTest
strcpy_s
(
request2
.
data
,
request2
.
len
,
body
);
defaultApi2
->
SendRequestProxyDF
(
&
(
g_service
[
1
].
identity
),
&
request2
,
NULL
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_threadID11
==
g_threadID21
,
TRUE
);
};
...
...
@@ -464,7 +464,7 @@ LITE_TEST_CASE(ShareTaskFuncTestSuite, testSharedTask0040, Function | MediumTest
strcpy_s
(
request2
.
data
,
request2
.
len
,
body
);
demoApi2
->
SendRequestProxyF
(
&
(
g_createFeature
[
1
].
identity
),
&
request2
,
NULL
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_threadID12
==
g_threadID22
,
TRUE
);
};
RUN_TEST_SUITE
(
ShareTaskFuncTestSuite
);
\ No newline at end of file
distributed_schedule_lite/samgr_hal/src/taskpool_singletask_func_test.c
浏览文件 @
41476310
...
...
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include
<los_base.h>
#include
"cmsis_os.h"
#include "securec.h"
#include "hctest.h"
#include "samgr_lite.h"
...
...
@@ -323,7 +323,7 @@ LITE_TEST_SUIT(distributedschedule, samgr, SingleTaskFuncTestSuite);
static
BOOL
SingleTaskFuncTestSuiteSetUp
(
void
)
{
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
return
TRUE
;
}
...
...
@@ -361,7 +361,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0010, Function | MediumTes
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
.
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
.
featureCalledCount
==
1
,
TRUE
);
// test defaultFeatureApi function
...
...
@@ -385,7 +385,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0010, Function | MediumTes
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
0
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
0
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -417,7 +417,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0020, Function | MediumTes
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
.
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
.
featureCalledCount
==
1
,
TRUE
);
DefaultFeatureApi
*
defaultApi
=
GetDefaultIUnknown
(
"SingleTS02"
);
...
...
@@ -440,7 +440,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0020, Function | MediumTes
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
1
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
1
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -472,7 +472,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0030, Function | MediumTes
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
.
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
.
featureCalledCount
==
1
,
TRUE
);
DefaultFeatureApi
*
defaultApi
=
GetDefaultIUnknown
(
"SingleTS03"
);
...
...
@@ -495,7 +495,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0030, Function | MediumTes
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
INDEX2
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
INDEX2
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -527,7 +527,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0040, Function | MediumTes
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
.
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
.
featureCalledCount
==
1
,
TRUE
);
DefaultFeatureApi
*
defaultApi
=
GetDefaultIUnknown
(
"SingleTS04"
);
...
...
@@ -550,7 +550,7 @@ LITE_TEST_CASE(SingleTaskFuncTestSuite, testSingleTask0040, Function | MediumTes
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
INDEX3
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
INDEX3
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
distributed_schedule_lite/samgr_hal/src/taskpool_specifiedtask_func_test.c
浏览文件 @
41476310
...
...
@@ -17,7 +17,7 @@
*/
#include <stdlib.h>
#include
<los_base.h>
#include
"cmsis_os.h"
#include "securec.h"
#include "cmsis_os2.h"
#include "hctest.h"
...
...
@@ -251,7 +251,7 @@ LITE_TEST_SUIT(distributedschedule, taskpool, SpecifiedTaskFuncTestSuite);
static
BOOL
SpecifiedTaskFuncTestSuiteSetUp
(
void
)
{
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
return
TRUE
;
}
...
...
@@ -285,7 +285,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0010, Function | Med
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
.
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
.
featureCalledCount
==
1
,
TRUE
);
// *************************** //
...
...
@@ -307,7 +307,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0010, Function | Med
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
0
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
0
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -336,7 +336,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0020, Function | Med
strcpy_s
(
request
.
data
,
request
.
len
,
body
);
int32
result2
=
demoApi
->
SendRequestProxyF
(
&
(
g_createFeature
.
identity
),
&
request
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_createFeature
.
featureCalledCount
==
1
,
TRUE
);
// *************************** //
...
...
@@ -358,7 +358,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0020, Function | Med
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
result2
=
defaultApi
->
SendRequestProxyDF
(
&
(
g_service
[
0
].
identity
),
&
request2
,
NULL
);
TEST_ASSERT_EQUAL_INT
(
result2
==
0
,
TRUE
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_service
[
0
].
serviceCalledCount
==
1
,
TRUE
);
};
...
...
@@ -397,7 +397,7 @@ LITE_TEST_CASE(SpecifiedTaskFuncTestSuite, testSpecifiedTask0030, Function | Med
strcpy_s
(
request2
.
data
,
request2
.
len
,
body2
);
defaultApi2
->
SendRequestProxyDF
(
&
(
g_service
[
1
].
identity
),
&
request2
,
NULL
);
LOS_Msleep
(
OPER_INTERVAL
);
osDelay
(
OPER_INTERVAL
);
TEST_ASSERT_EQUAL_INT
(
g_servicePoint1
==
g_servicePoint2
,
TRUE
);
};
RUN_TEST_SUITE
(
SpecifiedTaskFuncTestSuite
);
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录