1 Star 9 Fork 8

liyujie/arkui-developer-test-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ArkUI开发者自测试小工具

介绍

帮助ArkUI的部分CPP开发者快速方便地验证测试套

安装教程

  • python >= 3.7.9
  • 编译测试套的服务器或wsl必须要有lcov分支覆盖率工具
  • 目前测试支持rk3568板子,其余的设备有待支持(PS:主要是代码写的比较乱)
  • 安装彩色日志colorlog和ssh连接库paramiko

安装lcov分支覆盖率工具

sudo apt-get install lcov

安装python依赖库

pip install colorlog
pip install paramiko

使用说明

关于config.json文件的配置说明

其中personal部分属于个人配置部分

  • code-path: 代码路径(例如: /home/user/openharmony)
  • code-gcov: llvm-gcov.sh文件的放置路径(例如: /home/user/openharmony/tools/llvm-gcov.sh)
  • 在任意目录(必须是服务器或wsl上的路径)创建llvm-gcov.sh, 其中的具体内容为
exec code-path/prebuilts/clang/ohos/linux-x86_64/llvm/bin/llvm-cov gcov "$@"
  • 然后给llvm-gcov.sh赋可执行权限
chmod u+x llvm-gcov.sh

其中subsystem部分属于子系统部分

  • test_pathsshiled_paths: 不做修改, 是预留项
  • coverage_config: arkui的覆盖版本编译参数
  • coverage_path: 属于gcda产生后覆盖的路径, arkui的路径是code-path/out/rk3568/obj/foundation/arkui/ace_engine
  • test_target_name: 子系统编译测试目标名称, arkui的是ace_engine_test
  • test_out_path: 子系统编译后产生测试套的目录, arkui的路径是code-path/out/rk3568/tests/unittest/ace_engine
  • build_target: 子系统相关so的编译目标, arkui的是ace_packages
  • out_path: 子系统相关so的产生路径, 可以是多个, arkui可以只推送这一个libace_compatible.z.so
  • push_path: 子系统推入设备的路径,arkui在rk3568上是/system/lib/platformsdk

执行参数

  • -b --build-target: 测试套目标, 可以是多个目标, 例如 --build-target list_test_ng stack_test_ng, 用空格隔开
  • -f --fast-rebuild: 是否快速编译
  • -c --coverage: 是否产生覆盖率文件
  • -p --push-so: 是否推送so

执行例子

python run.py --build-target list_test_ng --fast-rebuild --coverage
# or
python run.py -b list_test_ng -f -c

注意:--build-target是必填项,其余都是选填

MIT License Copyright (c) 2023 liyujie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

帮助ArkUI开发者快速验证测试套 展开 收起
Python 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liyujie43/arkui-developer-test-tool.git
git@gitee.com:liyujie43/arkui-developer-test-tool.git
liyujie43
arkui-developer-test-tool
arkui-developer-test-tool
master

搜索帮助