未验证 提交 ffa3eff4 编写于 作者: Z zhangyicheng5 提交者: Gitee

Signed-off-by: 张益诚 <zhangyicheng5@huawei.com>

上级 1205a042
{
"description": "Config for kernel_lite test cases",
"environment": [
{
"type": "device",
"label": "ipcamera"
}
],
"kits": [
{
"type": "MountKit",
"server": "NfsServer",
"mount": [
{
"source": "testcases/small_device",
"target": "/test_root/small_device"
}
]
}
],
"driver": {
"type": "CppTestLite",
"execute": "/test_root/small_device/ActsKitFwkApiTest.bin"
}
}
\ No newline at end of file
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/hap_pack.gni")
import("//build/lite/config/subsystem/aafwk/config.gni")
import("//test/xts/tools/lite/build/suite_lite.gni")
executable("ActsKitFwkApiTest") {
sources = [ "kitfwk_oem_api_test.cpp" ]
include_dirs = [
"//third_party/googletest/googletest/include",
"//third_party/cJSON",
"//third_party/mbedtls/include/",
"//third_party/bounds_checking_function/include/",
"//base/startup/syspara_lite/interfaces/kits/",
# dir for oem_auth_config.h and oem_auth_result_storage.h
"//vendor/ingenic/smartpen/adapter/kitframework/include/",
]
deps = [
"//base/startup/syspara_lite/frameworks/token:token_shared",
"//build/lite/config/component/cJSON:cjson_shared",
"//test/xts/tools/lite/hcpptest:hcpptest_main",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/mbedtls:mbedtls_shared",
# dir for oem_auth_config.a and oem_auth_result_storage.a
"//vendor/ingenic/smartpen/adapter/kitframework:oem_auth_config",
"//vendor/ingenic/smartpen/adapter/kitframework:oem_auth_result_storage",
]
output_extension = "bin"
# un-comment this Macro for token-persist-test
# defines = [ "TOKEN_PERSIST_TEST" ]
}
# 使用说明
## 测试代码说明
> 本套测试代码,提供了3个用例
<table>
<thead>
<tr>
<th width="10%">标题</th>
<th width="15%">用例名称</th>
<th width="35%">测试步骤</th>
<th width="40%">预期结果</th>
</tr>
</thead>
<tbody>
<tr>
<td>用例1</td>
<td>接口基本功能测试</td>
<td>按默认条件编译出一个可执行文件,放入设备,检查日志</td>
<td>用例全部通过。并检查是否可搜到关键字:this is the first run of test after flash</td>
</tr>
<tr>
<td>用例2</td>
<td>数据重启可用测试</td>
<td>用例1执行完后,重启设备,检查日志</td>
<td>用例全部通过。并检查是否可搜到关键字:this is not the first run of test after flash</td>
</tr>
<tr>
<td>用例3</td>
<td>token持久化测试</td>
<td>打开 TOKEN_PERSIST_TEST 宏(去注释BUILD.gn里面倒数第二行defines)进行编译,放入设备,检查日志</td>
<td>用例全部通过。并检查是否可搜到关键字:this is the first run of test after flash</td>
</tr>
</tbody>
</table>
## 编译说明
### 第一步
当前路径BUILD.gn中修改include_dirs最后一行为oem_auth_config.h和oem_auth_result_storage.h 实际所在路径。
默认为:"//vendor/kitframework/include/"
例如君正x2000的oem_auth_config.h和oem_auth_result_storage.h可能要修改为:"//vendor/ingenic/smartpen/adapter/kitframework/include"
### 第二步
BUILD.gn中修改deps最后两行为oem_auth_config.a和oem_auth_result_storage.a实际所在路径。
例如君正x2000的oem_auth_config.h和oem_auth_result_storage.h可能要修改为:
"//vendor/ingenic/smartpen/adapter/kitframework:oem_auth_result_storage",
"//vendor/ingenic/smartpen/adapter/kitframework:oem_auth_config",
### 第二步
输入:hb build -f -T //test/xts/acts/applications/small_device:ActsKitFwkApiTest
编译完成后可在out/bin目录找到ActsKitFwkApiTest.bin文件
### 第三步
放入设备,运行看日志
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册