android测试camera cts常用命令

  1.camera cts:以下两个命令行,人选其一

android-cts、Android-cts-verfier和Media-cts:https://source.android.com/compatibility/cts/downloads

cd ~/android-cts/tools
./cts-tradefed
>> run cts --plan CTS -m CtsCameraTestCases --skip-preconditions --disable-reboot --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker --skip-system-status-check com.android.tradefed.suite.checker.KeyguardStatusChecker --dynamic-config-url=""   

adb pull /data/logs + path  #save logs
cd ~/android-cts/tools
./cts-tradefed
>> run cts -m CtsCameraTestCases --skip-preconditions --skip-all-system-status-check --dynamic-config-url=""

adb pull /data/logs + path  #save logs

2.测试单条case(仅限android_O),其中CtsMediaStressTestCasess是一个package,可替换你要测试的包,android.mediastress.cts.MediaRecorderStressTest#testStressCamera是这个包的单条case,可替换你自己的。注:前后要保持一致

run cts -m CtsMediaStressTestCases -t android.mediastress.cts.MediaRecorderStressTest#testStressCamera --skip-preconditions --skip-all-system-status-check --dynamic-config-url=""

3.cts-verifier:

cd ~/android-cts-verifier/
adb install -r -g CtsVerifier.apk
adb shell "am start -n com.android.cts.verifier/.CtsVerifierActivity"

adb pull /sdcard/verifierReports/ + path  #save reports

4.media cts:

  (4-1)下载得到Android-cts-media-1.4.zip,并解压;

(4-2)运行shell脚本,copy_media.sh 和 copy_image.sh;

(4-3)进入1中的目录,把命令中的CtsCameraTestCases==>CtsMediaTestCases;

(4-4)pull log: adb pull /data/log   + path.

5.vts test

vts测试包,可以在android 源代码中编译产生:

source build/envsetup.sh
lunch + your target
make vts -j8

说明:如果是编译cts命令可换成:make cts -j8

编译完成之后,会产生一个压缩包,解压,进入

cd ~/android-vts/tool
./vts_tradefed
>> run vts -m VtsHalCameraProviderV2_4Target

log:在当前目录

 

你可能感兴趣的:(android测试camera cts常用命令)