Android VTS&CTS

软件环境:ubuntu20.04 aosp
硬件环境:X86 PC
模拟环境:在host ubuntu20.04启动Android虚拟机运行图形HAL VTS;图形CTS

1. 编译

1.编译vts测试包
source build/envsetup.sh
lunch aosp_cf_auto_x86-userdebug
#编译VTS测试包
make vts -j12
#编译VTS测试包
make cts -j12

2. 运行

1.在cuttlefish运行环境准备工作

export ANDROID_SERIAL=0.0.0.0:6520
adb root
adb remount

2.拷贝vts测试包到cf运行环境,解压

cp out/host/linux-x86/vts/android-vts.zip cf-run-dir
cp out/host/linux-x86/cts/android-cts.zip cf-run-dir

unzip android-vts.zip
unzip android-cts.zip

cd android-vts/tools
cd android-cts

./vts-tradefed
./tools/cts-tradefed

3.Graphic 模块VTS&CTS测试

# Graphic Mapper模块VTS测试
run vts -m VtsHalGraphicsMapperV4_0TargetTest

# Graphics模块CTS测试
cts-tf >run cts --module CtsGraphicsTestCases 
cts-tf >run cts --module CtsOpenGLTestCases

4.图形可运行模块

VtsHalGraphicsComposerV2_1TargetTest
VtsHalGraphicsComposerV2_2TargetTest
VtsHalGraphicsComposerV2_3TargetTest
VtsHalGraphicsComposerV2_4TargetTest
VtsHalGraphicsMapperV2_0TargetTest
VtsHalGraphicsMapperV2_1TargetTest
VtsHalGraphicsMapperV3_0TargetTest
VtsHalGraphicsMapperV4_0TargetTest

5.稍等10秒有运行结果
在这里插入图片描述
在这里插入图片描述

3. Vts命令介绍

#单跑某一个模块
> run vts -m <模块名>
#单跑某个测试项 
> run vts -m <模块名> -t <测试项名>
#列出结果
> l r

3.1 单独测试

1. 编译图形hal vts 
mmm hardware/interfaces/graphics/composer/2.4/vts/functional/
2. 测试二进制文件位于
out/target/product/vsoc_x86/data/nativetest/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
3. 单独执行某VTS测试用例
export ANDROID_SERIAL=0.0.0.0:6520
adb root
adb remount 
adb push VtsHalGraphicsComposerV2_4TargetTest /data
adb shell /data/VtsHalGraphicsComposerV2_4TargetTest --gtest_filter=* --gtest_repeat=1 --gtest_color=yes --gtest_break_on_failure

4 问题解决

4.1 .E/ClearcutClient: connect timed out

#原因:跑cts时,会从Google server同步一些文件,需要网络能访问外网

#解决办法:ubuntu上运行cts-tradefed/vts-tradefed命令行前
adb shell settings put global http_proxy IP:PORT
export http_proxy=http://IP:PORT;
export https_proxy=http://IP:PORT
export JAVA_TOOL_OPTIONS='-Djava.net.useSystemProxies=true'
#测试结束后ubuntu取消代理
unset http_proxy && unset https_proxy
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值