日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

cts测试linux指令skip,CTS测试命令详细

發布時間:2023/12/20 linux 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 cts测试linux指令skip,CTS测试命令详细 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

help:

help命令的截圖

Available commands and options

Host:

help:

show this message

這是我們現在使用的方式,主要是為顯示幫助信息

help all:

show the complete tradefed help

顯示更多的幫助信息

exit:

gracefully exit the cts console, waiting till all invocations are complete

退出終端

Run:

run cts --plan test_plan_name:

run a test plan

比如:

run cts –plan CTS

run cts --package/-p :

run a CTS test package

這是路一個包的測試:

比如:

run cts --package/-p android.app

run cts --class/-c [--method/-m] :

run a specific test class and/ormethod

這是測試類或方法的測試命令:

比如:

run cts –c android.app.cts.SystemFeaturesTest

run cts –c android.app.cts.SystemFeaturesTest -m testLiveWallpaperFeature

run cts --continue-session session_ID:

run all not executed tests from a previous CTS session

這個命令是指在以前的一個測試報道上繼續跑未跑的測試項,這個命令非常有用,特別是我們跑完第一次,有的測試項因為各種原因沒有跑,那我們可以在這個測試報告上接著繼續跑。

我們先使用l r查看現在的測試報道情況,再使用下面的命令跑sessin id為2的測試報告:

run cts --continue-session 2

run cts [options] --serial/-s device_ID:

run CTS on specified device

這個是如果我們電腦同進有連接多臺手機測試時,我們指定手機來跑CTS

run cts –plan CTS –s 0123456789ABCDEF

run cts [options] --shards number_of_shards:

shard a CTS run into given number of independent chunks, to run on multiple devices inparallel

在幾臺手機上同時跑CTS,CTS會比較均衡的分配到二臺機器上,這個命令有用

run cts –plan CTS –shards 5

run cts --help/--help-all:

get more help on running CTS

查看跑CTS更多的命令

List:

l/list d/devices:

list connected devices and their state

l d:查看當前設備以及他們的狀態,顯示他們的Serial,電量,等等信息

l/list packages:

list CTS test packages

l packages:查看當前的CTS測試的包

l/list p/plans:

list CTS test plans

l p:查看CTS的plan信息,這個plan信息是在android-cts/repository/plans目錄下

l/list i/invocations:

list invocations aka CTS test runs currentlyin progress

這個命令我測試,發現沒有任何反應,讓不要騙我,我書讀的不多啊

l/list c/commands:

list commands: aka CTS test run commands currently in the queue waiting to be allocated devices

這個命令我測試,發現沒有任何反應,讓不要騙我,我書讀的不多啊

l/list r/results:

list CTS results currently present in the repository

l r: 主要是查看當前CTS的測試結果

Add:

add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]:

derive a plan from the given session

這個命令沒有用過,但是從名字看,我們理解為添加一個plan的測試在給定的sesiion id上。

Dump:

d/dump l/logs:

dump the tradefed logs for all running invocations

d l:好像只是把終端的一些信息保存到/tmp/目錄下,如下:

cts-tf > d l

Saved log to /tmp/tradefed_global_log_8844580533638460782.txt

Options:

--disable-reboot :

Do not reboot device after running some amount of tests.

這個沒有用過,不過從名字看,是說不要重啟機器

run cts –help

run cts –help命令截圖

感覺這個沒有什么特別要解釋的:

cts-tf > run cts –help

‘cts’ configuration: Runs a CTS plan from a pre-existing CTS installation

Printing help for only the important options. To see help for all options, use the –help-all flag

cmd_options options:

–[no-]help display the help text for the most important/critical options. Default: false.

–[no-]help-all display the full help text for all options. Default: false.

–[no-]dry-run build but don’t actually run the command. Intended as a quick check to ensure that a command is runnable. Default: false.

–[no-]noisy-dry-run build but don’t actually run the command. This version prints the command to the console. Intended for cmdfile debugging. Default: false.

–[no-]loop keep running continuously. Default: false.

test options:

--plan the test plan to run.-p, --package the test packages(s) to run.-c, --class run a specific test class.-m, --method run a specific test method, from given --class.-t, --test run a specific test--continue-session continue a previous test session.--force-abi The abi to use, can be either 32 or 64.

這個命令應該是忽略abi的位數,直接測試

‘file’ logger options:

-l, –log-level-display

the minimum log level to display on stdout. Default: ERROR. Valid values: [VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT]

run cts –help-all

cts-tf > run cts –help-all

‘cts’ configuration: Runs a CTS plan from a pre-existing CTS installation

cmd_options options:

–[no-]help display the help text for the most important/critical options. Default: false.

–[no-]help-all display the full help text for all options. Default: false.

–[no-]json-help display the full help in json format. Default: false.

run cts –json-help

顯示json 的格式

–[no-]dry-run build but don’t actually run the command. Intended as a quick check to ensure that a command is runnable. Default: false.

–[no-]noisy-dry-run build but don’t actually run the command. This version prints the command to the console. Intended for cmdfile debugging. Default: false.

–min-loop-time

the minimum invocation time in ms when in loop mode. Default: 600000.

–max-random-loop-time

the maximum time to wait between invocation attempts when in loop mode. when set, the actual value will be a random number between min-loop-time and this number.

--[no-]loop

keep running continuously. Default: false.

使測試持續進行

--[no-]all-devices

fork this command to run on all connected devices. Default: false.

使測試在所有連接的設備上同進進行測試

–[no-]bugreport-on-invocation-ended

take a bugreport when the test invocation has ended Default: false.

device_requirements options:—這個是和設備相關的一些選項

-s, --serial

run this test on a specific device with given serial number(s).

測試限定在對應serial的設備上進行

--exclude-serial

run this test on any device except those with this serial number(s).

測試排除在對應serial的設備的其它設備上進行

–product-type

run this test on device with this product type(s). May also filter by variant using product:variant.

–property

run this test on device with this property value. Expected format –property .

-e, –[no-]emulator

force this test to run on emulator. Default: false.

在模擬器上進行測試

-d, –[no-]device

force this test to run on a physical device, not an emulator. Default: false.

在物理設備上進行測試

–[no-]new-emulator

allocate a placeholder emulator. Should be used when config intends to launch an emulator Default: false.

-n, –[no-]null-device

do not allocate a device for this test. Default: false.

不分配設備進行測試

–min-battery

only run this test on a device whose battery level is at least the given amount. Scale: 0-100

設置測試的最少電池

–max-battery

only run this test on a device whose battery level is strictly less than the given amount. Scale: 0-100

設置測試的最大電池

–[no-]require-battery-check

If –min-battery and/or –max-battery is specified, skip devices that have an unknown battery level. Note that this may leave restart-looping devices in limbo indefinitely without manual intervention. Default: true.

如果設置了電池的最小最大值,不明電池電量的設置會被忽略,不進行測試

–min-sdk-level

Only run this test on devices that support this Android SDK/API level

–max-sdk-level

Only run this test on devices that are running this or lower Android SDK/API level

device_options options:—–設備選項

–[no-]enable-root

enable adb root on boot. Default: false.

可以使設備root

–[no-]disable-keyguard

attempt to disable keyguard once boot is complete. Default: true.

使設備不能鎖屏

–disable-keyguard-cmd

shell command to disable keyguard. Default: input keyevent 82.

使設備不能鎖屏

–[no-]enable-logcat

Enable background logcat capture when invocation is running. Default: true.

解發后臺logcat

–max-tmp-logcat-file

The maximum size of tmp logcat data to retain, in bytes. Only used if –enable-logcat is set Default: 20971520.

設置最大的臨時logcat數據比特數

–fastboot-timeout

time in ms to wait for a device to boot into fastboot. Default: 60000.

fastboot的超時時間

–adb-recovery-timeout

time in ms to wait for a device to boot into recovery. Default: 60000.

adb recovery的超時時間

–reboot-timeout

time in ms to wait for a device to reboot to full system. Default: 120000.

reboot的超時時間

–[no-]use-fastboot-erase

use fastboot erase instead of fastboot format to wipe partitions Default: false.

使用fastboot erase來替換fastboot format來wipe分區

–unencrypt-reboot-timeout

time in ms to wait for the device to format the filesystem and reboot after unencryption Default: 0.

解密reboot超時時間

–online-timeout

default time in ms to wait for the device to be visible on adb. Default: 60000.

設備被abd識別的超時時間

–available-timeout

default time in ms to wait for the device to be available aka fully boot. Default: 360000.

設備完全得到aka boot的超時時間

–ping-ip-or-host

default ip or host to ping during connectivity checks; [deprecated] use –ping-url instead. Default: www.google.com.

ping的地址

–conn-check-url

default URL to be used for connectivity checks. Default: http://www.google.com.

連接確認的地址

–wifi-attempts

default number of attempts to connect to wifi network. Default: 5.

連接wifi的數量

–wifi-retry-wait-time

the base wait time in ms between wifi connect retries. The actual wait time would be a multiple of this value. Default: 60000.

wifi重新連接的時間

–post-boot-command

shell command to run after reboots during invocation

重啟機器后執行shell 命令

–cutoff-battery

the minimum battery level required to continue the invocation. Scale: 0-100

設備執行測試的最少電池電量

‘file-system-log-saver’ log_saver options:—-文件系統log保存的選項

–log-file-path

root file system path to store log files. Default: /tmp.

保存root文件系統log文件的路徑

–log-file-url

root http url of log files. Assumes files placed in log-file-path are visible via this url.

保存log的地址

–log-retention-days the number of days to keep saved log files.

log保存的日期天數

–[no-]compress-files

whether to compress files which are not already compressed Default: true.

是否壓縮文件

build_provider options:—–編譯提供者的選項

–cts-install-path

the path to the cts installation to use Default: ./../…

安裝cts的路徑

device_recovery options:—–設備恢復選項

–device-wait-time

maximum time in ms to wait for a single device recovery command. Default: 240000.

單個設備恢復命令的等待時間

–bootloader-wait-time

maximum time in ms to wait for device to be in fastboot. Default: 30000.

等待設備fastboot的時間

–shell-wait-time

maximum time in ms to wait for device shell to be responsive. Default: 30000.

shell 命令響應時間

–fastboot-wait-time

maximum time in ms to wait for a fastboot command result. Default: 30000.

fastboot 命令執行時間

–min-battery-after-recovery

require a min battery level after successful recovery, default to 0 for ignoring. Default: 0.

成功revovery后最少的電池電量

–[no-]disable-unresponsive-reboot

If this is set, we will not attempt to reboot an unresponsive devicethat is in userspace. Note that this will have no effect if the device is in fastboot or is expected to be in fastboot. Default: false.

禁止重啟一個沒有反應的設備

##’device-precondition-preparer’ target_preparer options:—設備前期準備的選項

--[no-]skip-preconditions

Whether to skip precondition checks and automation Default: false.

這個命令有用,是直接跳過前期的檢查工作,直接強制運行相關的測試。特別是android 6.0后,CTS測試如果不加這個,會進行前期的wifi,網絡,視頻,location等等的檢查。

‘host-precondition-preparer’ target_preparer options:–host的前期準備的選項

--[no-]skip-preconditions

Whether to skip precondition checks and automation Default: false.

這個和上面的一樣,也是跳過前期的檢查

–wifi-ssid

Name of the WiFi network with which to connect

連接那個wifi

–wifi-psk

The WPA-PSK associated with option ‘wifi-ssid’

WPA-PSK連接wifi-ssid

--[no-]skip-media-download

Whether to skip verifying/downloading media files Default: false.

是否忽略檢查和下載視頻

–local-media-path

Absolute path of the media files directory on the host, containing’bbb_short’ and ‘bbb_full’ directories

本地視頻的路徑

test options:——測試選項

--plan the test plan to run.-p, --package the test packages(s) to run.--exclude-package the test packages(s) to exclude from the run.-c, --class run a specific test class.-m, --method run a specific test method, from given --class.-t, --test run a specific test--continue-session continue a previous test session.

-d, --[no-]skip-device-info

flag to control whether to collect info from device. Providing this flag will speed up test execution for short test runs but will result in required data being omitted from the test report. Default: false.

不收集設備信息,加快測試速度

例如:

run cts -c android.hardware.cts.SensorBatchingTests --skip-preconditions –d

–[no-]resume

flag to attempt to automatically resume aborted test run on another connected device. Default: false.

自動在另外一個連接的設備上啟動一個已經停止的測試

--shards

shard the tests to run into separately runnable chunks to execute on multiple devices concurrently. Default: 1.

同時在幾臺設備上跑一個測試

–[no-]screenshot

flag for taking a screenshot of the device when test execution is complete. Default: false.

測試結束時截屏

-b, –[no-]bugreport

take a bugreport after each failed test. Warning: can potentially use a lot of disk space. Default: false.

沒有用過,也看不懂

-k, –[no-]run-known-failures

run tests including known failures Default: false.

跑一些已經知道的failures測試項

--[no-]disable-reboot

Do not reboot device after running some amount of tests. Default behavior is to reboot. Default: false.

禁止重啟機器

–reboot-wait-time

Additional wait time in ms after boot complete. Default: 120000.

reboot等待時間

–reboot-interval

Interval between each reboot in min. Default: 30.

reboot interval時間

–[no-]screenshot-on-failure

take a screenshot on every test failure. Default: false.

在每個測試失敗時,截屏

–[no-]logcat-on-failure

take a logcat snapshot on every test failure. Unlike –bugreport, this can capturelogs even if connection with device has been lost, as well as being much more performant. Default: false.

在每個測試失敗的時提取logcat

--force-abi

The abi to use, can be either 32 or 64.

強制忽略abi類型,直接使用

–logcat-on-failure-size

The max number of logcat data in bytes to capture when –logcat-on-failure is on. Should be an amount that can comfortably fit in memory. Default: 512000.

logcat on failure的字節數

–[no-]collect-deqp-logs

Collect dEQP logs from the device. Default: false.

提取dEQP log

–include Positive filters to pass to tests.

–exclude Negative filters to pass to tests.

–min-pre-reboot-package-count

The minimum number of packages to require a pre test reboot Default: 2.

收集以前的測試reboot的最小包數

‘file’ logger options:——文件logger選項

–log-level

the minimum log level to log. Default: DEBUG. Valid values: [VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT]

log 的level

-l, –log-level-display

the minimum log level to display on stdout. Default: ERROR. Valid values: [VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT]

最小log level

–log-tag-display

Always display given tags logs on stdout

顯示特定tag的log

–max-log-size

maximum allowable size of tmp log data in mB. Default: 20.

log的最大大小

result_reporter options:—–結果報告的選項

–[no-]quiet-output

Mute display of test results. Default: false.

放棄輸出報道

–output-file-path

root file system path to directory to store xml test results and associated logs. If not specified, results will be stored at /repository/results

自定義報道和log的輸出位置

--plan

the test plan to run. Default: NA.

測試plan

--continue-session

the test result session to continue.

測試結果的session,以便接著跑

–result-server

Server to publish test results.

放置測試結果到服務器上

–[no-]include-test-log-tags

Include test log tags in XML report. Default: false.

在xml報道中包含tags的log信息

–[no-]use-log-saver

Also saves generated result XML with log saver Default: false.

user log的saver

result_reporter options: —–結果報告的選項

–[no-]quiet-output

Mute display of test results. Default: false.

放棄輸出報道

result_reporter options: –issue-server Server url to post test failures to. 旋轉測試失敗項的服務器地址

總結

以上是生活随笔為你收集整理的cts测试linux指令skip,CTS测试命令详细的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。