对鸿蒙蓝牙接口进行xts用例编写

对C++代码不是很熟悉,编写xts标准系统的代码需要c++,主体就是ai生成的c++代码,然后对各种情况进行断言判断,之后运行出一个结果。

鸿蒙xts测试环境准备_openharmony 编译xts测试版本-CSDN博客

环境搭建:

采用的是鸿蒙6.0代码,这个测试环境就是拉取鸿蒙6.0代码,然后切换到鸿蒙代码里面的test目录下进行编译acts,当前的接口都是api接口,不需要其他的,acts就可以满足。

复制代码
//全量运行
./build.sh product_name=rk3568 system_size=standard    
//运行该子系统之中的
./build.sh product_name=rk3568 system_size=standard target_subsystem=distributeddatamgr

编写acts测试用例后,就可以在板子上进行运行了。

首先就是将out目录下的rk3568之中的suits目录之中的acts下载到windows环境之中,然后将切换到acts之中的acts,找到./run.bat文件,执行后,找到测试用例放在哪里,然后执行该测试套件。

复制代码
// 全量测试acts的测试
run -l ActsFileShareBleClientTest
// 测试acts之中的部分测试
run -l ActsFileShareBleClientTest --gtest_list_tests

全量

复制代码
## 安装git客户端和git-lfs等基础软件
sudo apt-get update
sudo apt-get install git git-lfs curl python3-pip net-tools ssh ninja-build 

修改sh默认为bash 
sudo dpkg-reconfigure dash  选择No
ls -al /bin/sh 显示bash表示成功

## python环境
sudo apt install python3-pip	

#安装pip3
sudo pip3 install kconfiglib	

#安装GUI menuconfig工具
sudo ln -s /usr/bin/python3  /usr/bin/python	

#设置python3软连接

## 配置用户信息
git config --global user.name "user.name"
git config --global user.email "user.email"
git config --global credential.helper store
ssh-keygen -t rsa -C user.email
回车到底
cat ~/.ssh/id_rsa.pub
ssh -T git@gitee.com

码云gitee添加公钥
检查gitee配置执行 
ssh -T git@gitee.com
Hi USERNAME! You've successfully authenticated, but GITEE.COM does not provide shell access.

## 安装码云repo工具
sudo mkdir /usr/bin
sudo curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/bin/repo 
sudo chmod a+x /usr/bin/repo
sudo pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests

## 切换源 

## 源码下载
sudo ln -s /usr/bin/python3 /usr/bin/python
repo init -u https://gitcode.com/openharmony/manifest -b OpenHarmony-6.0-Release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'

## 安装库和工具集   不要安装gcc-arm-linux-gnueabi
bash build/build_scripts/env_setup.sh
source ~/.bashrc

## 编译
bash build/prebuilts_download.sh
首次编译  bash build.sh --product-name rk3568 --ccache
--fast-rebuild  build.gn等配置不变的时候可用



```
sudo apt-get update
sudo apt-get install -y bison flex libssl-dev libreadline-dev \
    libncurses5-dev autoconf automake libtool pkg-config
```


./build.sh product_name=rk3568 system_size=standard
./build.sh product_name=rk3568 system_size=standard target_subsystem=distributeddatamgr


run -l ActsFileShareBleClientTest
run -l ActsFileShareBleClientTest --gtest_list_tests



run -l ActsFileShareBlediscoverTest
相关推荐
谷子在生长15 小时前
纯血鸿蒙自定义弹窗最佳实践:从「到处复制」到「一行调用」
前端·harmonyos
小魔女千千鱼1 天前
把 Go 塞进鸿蒙PC:windows上用 c-shared 跑 2048
harmonyos
TrisighT1 天前
Electron 跑在鸿蒙 PC 上,单窗口和多窗口内存差 800MB?我抓了 5 组数据
性能优化·electron·harmonyos
TrisighT2 天前
AI写埋点代码,35%覆盖率坑惨运营
harmonyos·arkts·arkui
Junerver5 天前
把 DevEco Code 的 HarmonyOS 开发能力装进口袋——harmonyos-dev-skill
harmonyos
程序猿追6 天前
那个右下角的小数字怎么“卡”住我打字——我用 HarmonyOS 自己写了一个字数限制输入框
pytorch·华为·harmonyos
古德new6 天前
鸿蒙PC使用electron迁移:Joplin Electron 桌面适配全记录
华为·electron·harmonyos
世人万千丶6 天前
桌面便签小应用 - HarmonyOS ArkUI 开发实战-TextArea与Flex布局-PC版本
华为·harmonyos·鸿蒙·鸿蒙系统
慧海灵舟6 天前
AGenUI 鸿蒙端实战踩坑录:从 Column 布局消失到异步组件宽度为 0
华为·harmonyos