对鸿蒙蓝牙接口进行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
相关推荐
huang_xiaoen2 小时前
鸿蒙手机远程控制电脑哪个好用?2026鸿蒙远控软件横测推荐
华为·harmonyos·远程工作·远程工具·远程办公
爱写Bug的浮游1 天前
初识仓颉:5 分钟看懂核心语法
harmonyos·编程语言
羽落•无痕(苏晗默)1 天前
华为数通IA——14、网络服务与应用:TCP/UDP 传输层协议与 FTP、Telnet、SSH 实践
网络·网络协议·tcp/ip·网络安全·华为·udp·信息与通信
程序猿追2 天前
鸿蒙 PC 的 Ionic 工单有两个错误,按下生成后光标该去哪儿
华为·harmonyos
KevinChaos2 天前
随手备忘录手记 04|HarmonyOS 7.0新特性实验:物品图鉴的加载逻辑
华为·harmonyos
Sirius_Ji2 天前
从硬解基座到字幕与滤镜链:ffmpeg-for-HarmonyOS v0.3.2
harmonyos
用户86194177207412 天前
uni-app 鸿蒙端提现点不动?我用 UTS 插件补上了微信"确认收款"
微信·harmonyos
码间留白2 天前
uni-app 鸿蒙端提现点不动?我用 UTS 插件补上了微信"确认收款"
uni-app·harmonyos·鸿蒙·uts插件·微信商家转账
GitCode官方3 天前
开源鸿蒙跨平台直播|AI 时代,用 cj-tauri 开发鸿蒙 PC 应用
人工智能·华为·harmonyos·atomgit
程序猿追3 天前
鸿蒙 PC 用 Tauri 做本地查找,怎样让慢请求给新请求让路
华为·状态模式·harmonyos