Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4cf3d8ca
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看板
提交
4cf3d8ca
编写于
7月 23, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 23, 2021
浏览文件
操作
浏览文件
下载
差异文件
!351 【startup_lite】【master】syspara_hal:fix the problematic use cases
Merge pull request !351 from 南先森/startup_lite
上级
e2ea7063
8ff8d7c4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
49 addition
and
52 deletion
+49
-52
startup_lite/syspara_hal/src/parameter_func_test.c
startup_lite/syspara_hal/src/parameter_func_test.c
+24
-26
startup_lite/syspara_hal/src/parameter_reli_test.c
startup_lite/syspara_hal/src/parameter_reli_test.c
+21
-21
startup_lite/syspara_hal/src/parameter_utils.c
startup_lite/syspara_hal/src/parameter_utils.c
+3
-4
startup_lite/syspara_hal/src/parameter_utils.h
startup_lite/syspara_hal/src/parameter_utils.h
+1
-1
未找到文件。
startup_lite/syspara_hal/src/parameter_func_test.c
浏览文件 @
4cf3d8ca
...
...
@@ -62,7 +62,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTe
{
const
char
*
value
=
GetDeviceType
();
printf
(
"Device Type=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -74,7 +74,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTe
{
const
char
*
value
=
GetManufacture
();
printf
(
"Manufacture=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -86,7 +86,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTe
{
const
char
*
value
=
GetBrand
();
printf
(
"Brand=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -98,7 +98,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTe
{
const
char
*
value
=
GetMarketName
();
printf
(
"Market Name=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -110,7 +110,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTe
{
const
char
*
value
=
GetProductSeries
();
printf
(
"Product Series=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -122,7 +122,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTe
{
const
char
*
value
=
GetProductModel
();
printf
(
"Product Model=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -134,7 +134,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTe
{
const
char
*
value
=
GetHardwareModel
();
printf
(
"Hardware Model=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -146,7 +146,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTe
{
const
char
*
value
=
GetHardwareProfile
();
printf
(
"Hardware Profile=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -158,7 +158,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe
{
const
char
*
value
=
GetSerial
();
printf
(
"Serial=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -170,7 +170,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTe
{
const
char
*
value
=
GetOSFullName
();
printf
(
"Os Name=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -182,7 +182,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTe
{
const
char
*
value
=
GetDisplayVersion
();
printf
(
"Display Version=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -194,7 +194,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTe
{
const
char
*
value
=
GetBootloaderVersion
();
printf
(
"Bootloader Version=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -206,7 +206,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe
{
const
char
*
value
=
GetSecurityPatchTag
();
printf
(
"Secure Patch Level=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -218,7 +218,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTe
{
const
char
*
value
=
GetAbiList
();
printf
(
"Abi List=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -230,8 +230,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTe
{
int
value
=
GetFirstApiVersion
();
printf
(
"First Api Level=%d
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
TEST_ASSERT_TRUE
((
int
)
value
==
value
);
TEST_ASSERT_TRUE
(
value
>
0
);
};
/**
...
...
@@ -243,7 +242,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTe
{
const
char
*
value
=
GetIncrementalVersion
();
printf
(
"Incremental Version=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -255,7 +254,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTe
{
const
char
*
value
=
GetVersionId
();
printf
(
"Version Id=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -267,7 +266,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTe
{
const
char
*
value
=
GetBuildType
();
printf
(
"Build Type=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -279,7 +278,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTe
{
const
char
*
value
=
GetBuildUser
();
printf
(
"Build User=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -291,7 +290,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTe
{
const
char
*
value
=
GetBuildHost
();
printf
(
"Build Host=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -303,7 +302,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTe
{
const
char
*
value
=
GetBuildTime
();
printf
(
"Build Time=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -315,7 +314,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTe
{
const
char
*
value
=
GetBuildRootHash
();
printf
(
"Build Root Hash=%s
\n
"
,
value
);
IsEmpty
(
value
);
TEST_ASSERT_NOT_NULL
(
value
);
};
/**
...
...
@@ -327,7 +326,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTe
{
const
char
*
value
=
GetSoftwareModel
();
printf
(
"Software Model=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
};
/**
...
...
@@ -339,8 +338,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara024, Function | MediumTe
{
int
value
=
GetSdkApiVersion
();
printf
(
"Sdk Api Level=%d
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
TEST_ASSERT_TRUE
((
int
)
value
==
value
);
TEST_ASSERT_TRUE
(
value
>
0
);
};
/**
...
...
startup_lite/syspara_hal/src/parameter_reli_test.c
浏览文件 @
4cf3d8ca
...
...
@@ -56,7 +56,7 @@ static BOOL ParameterReliTestSuiteTearDown(void)
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetDeviceType
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetDeviceType
();
...
...
@@ -73,7 +73,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetManufacture
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetManufacture
();
...
...
@@ -90,7 +90,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli003
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBrand
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBrand
();
...
...
@@ -107,7 +107,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli004
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetMarketName
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetMarketName
();
...
...
@@ -124,7 +124,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli005
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetProductSeries
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetProductSeries
();
...
...
@@ -141,7 +141,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli006
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetProductModel
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetProductModel
();
...
...
@@ -158,7 +158,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli007
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetHardwareModel
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetHardwareModel
();
...
...
@@ -175,7 +175,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli008
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetHardwareProfile
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetHardwareProfile
();
...
...
@@ -212,7 +212,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli010
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetOSFullName
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetOSFullName
();
...
...
@@ -229,7 +229,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli011
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetDisplayVersion
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetDisplayVersion
();
...
...
@@ -246,7 +246,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli012
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBootloaderVersion
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBootloaderVersion
();
...
...
@@ -263,7 +263,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli013
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetSecurityPatchTag
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSecurityPatchTag
();
...
...
@@ -280,7 +280,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli014
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetAbiList
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetAbiList
();
...
...
@@ -315,7 +315,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli016
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetIncrementalVersion
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetIncrementalVersion
();
...
...
@@ -332,7 +332,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli017
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetVersionId
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetVersionId
();
...
...
@@ -349,7 +349,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli018
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildType
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildType
();
...
...
@@ -366,7 +366,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli019
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildUser
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildUser
();
...
...
@@ -383,7 +383,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli020
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildHost
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildHost
();
...
...
@@ -400,7 +400,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli021
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildTime
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildTime
();
...
...
@@ -417,7 +417,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli022
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildRootHash
();
IsEmpty
(
value1
);
TEST_ASSERT_NOT_NULL
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildRootHash
();
...
...
@@ -434,7 +434,7 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | Medi
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli023
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetSoftwareModel
();
Is
Empty
(
value1
);
AssertNot
Empty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSoftwareModel
();
...
...
startup_lite/syspara_hal/src/parameter_utils.c
浏览文件 @
4cf3d8ca
...
...
@@ -16,11 +16,10 @@
#include "hctest.h"
#include "parameter_utils.h"
void
Is
Empty
(
const
char
*
sysPara
)
void
AssertNot
Empty
(
const
char
*
sysPara
)
{
TEST_ASSERT_NOT_NULL
(
sysPara
);
if
(
sysPara
!=
NULL
)
{
if
(
strlen
(
sysPara
)
!=
0
)
{
TEST_ASSERT_NOT_NULL
(
sysPara
);
}
TEST_ASSERT_TRUE
(
strlen
(
sysPara
)
>
0
);
}
}
\ No newline at end of file
startup_lite/syspara_hal/src/parameter_utils.h
浏览文件 @
4cf3d8ca
...
...
@@ -25,7 +25,7 @@
* @tc.name :determines whether the string is empty.
* @param :system parameter
*/
void
Is
Empty
(
const
char
*
sysPara
);
void
AssertNot
Empty
(
const
char
*
sysPara
);
#ifdef __cplusplus
#if __cplusplus
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录