首先shell脚本变了,4.0里面叫cts-tradefed
$ ./cts-tradefed --help
CTS-tradefed host version 4.0.3_r3
CTS-tradefed is the test harness for running the Android Compatibility Suite, built on top of the tradefed framework.
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 --package/-p : run a CTS test package
run cts --class/-c [--method/-m] : run a specific test class and/ormethod
run cts --continue-session session_ID: run all not executed tests from a previous CTS session
run cts [options] --serial/s device_ID: run CTS on specified device
run cts [options] --shards number_of_shards: shard a CTS run into given number of independent chunks, to run on multiple devices inparallel
run cts --help/--help-all: get more help on running CTS
List:
l/list d/devices: list connected devices and their state
l/list packages: list CTS test packages
l/list p/plans: list CTS test 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
Add:
add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]: derive a plan from the given session
Dump:
d/dump l/logs: dump the tradefed logs for all running invocations
列出所有的package:
$ ./cts-tradefed list packages
Android CTS 4.0.3_r3
Using commandline arguments as starting command: [list, packages]
09-06 14:05:32 I/DeviceManager: Detected new device 014971B509017018
android.acceleration
android.accessibilityservice
android.accounts
android.admin
android.animation
android.apidemos.cts
android.app
android.bluetooth
android.content
android.core.tests.libcore.package.com
android.core.tests.libcore.package.dalvik
android.core.tests.libcore.package.libcore
android.core.tests.libcore.package.org
android.core.tests.libcore.package.sun
android.core.tests.libcore.package.tests
android.core.vm-tests
android.core.vm-tests-tf
android.database
android.dpi
android.dpi2
android.drm
android.example
android.gesture
android.graphics
android.graphics2
android.hardware
android.holo
android.jni
android.location
android.media
android.mediastress
android.nativemedia
android.ndef
android.net
android.openglperf
android.os
android.permission
android.permission2
android.preference
android.preference2
android.provider
android.renderscript
android.sax
android.security
android.speech
android.telephony
android.tests.appsecurity
android.tests.sigtest
android.text
android.textureview
android.util
android.view
android.webkit
android.widget
以media为例,测试单一的package
$ ./cts-tradefed
Android CTS 4.0.3_r3
cts-tf > 09-06 14:06:18 I/DeviceManager: Detected new device 014971B509017018
cts-tf > run cts --package android.media
--09-06 14:07:09 I/014971B509017018: Collecting device info
09-06 14:07:11 I/014971B509017018: -----------------------------------------
09-06 14:07:11 I/014971B509017018: Test package android.media started
09-06 14:07:11 I/014971B509017018: -----------------------------------------
测试单独的case:
cts-tf > run cts -c android.mediastress.cts.H264R480pAacShortPlayerTest -m testPlay00
$ ./cts-tradefed --help
CTS-tradefed host version 4.0.3_r3
CTS-tradefed is the test harness for running the Android Compatibility Suite, built on top of the tradefed framework.
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 --package/-p : run a CTS test package
run cts --class/-c [--method/-m] : run a specific test class and/ormethod
run cts --continue-session session_ID: run all not executed tests from a previous CTS session
run cts [options] --serial/s device_ID: run CTS on specified device
run cts [options] --shards number_of_shards: shard a CTS run into given number of independent chunks, to run on multiple devices inparallel
run cts --help/--help-all: get more help on running CTS
List:
l/list d/devices: list connected devices and their state
l/list packages: list CTS test packages
l/list p/plans: list CTS test 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
Add:
add derivedplan --plan plane_name --session/-s session_id -r [pass/fail/notExecuted/timeout]: derive a plan from the given session
Dump:
d/dump l/logs: dump the tradefed logs for all running invocations
Android CTS 4.0.3_r3
Using commandline arguments as starting command: [list, packages]
09-06 14:05:32 I/DeviceManager: Detected new device 014971B509017018
android.acceleration
android.accessibilityservice
android.accounts
android.admin
android.animation
android.apidemos.cts
android.app
android.bluetooth
android.content
android.core.tests.libcore.package.com
android.core.tests.libcore.package.dalvik
android.core.tests.libcore.package.libcore
android.core.tests.libcore.package.org
android.core.tests.libcore.package.sun
android.core.tests.libcore.package.tests
android.core.vm-tests
android.core.vm-tests-tf
android.database
android.dpi
android.dpi2
android.drm
android.example
android.gesture
android.graphics
android.graphics2
android.hardware
android.holo
android.jni
android.location
android.media
android.mediastress
android.nativemedia
android.ndef
android.net
android.openglperf
android.os
android.permission
android.permission2
android.preference
android.preference2
android.provider
android.renderscript
android.sax
android.security
android.speech
android.telephony
android.tests.appsecurity
android.tests.sigtest
android.text
android.textureview
android.util
android.view
android.webkit
android.widget
Android CTS 4.0.3_r3
cts-tf > 09-06 14:06:18 I/DeviceManager: Detected new device 014971B509017018
cts-tf > run cts --package android.media
--09-06 14:07:09 I/014971B509017018: Collecting device info
09-06 14:07:11 I/014971B509017018: -----------------------------------------
09-06 14:07:11 I/014971B509017018: Test package android.media started
09-06 14:07:11 I/014971B509017018: -----------------------------------------
cts-tf > run cts -c android.mediastress.cts.H264R480pAacShortPlayerTest -m testPlay00