In order to release a device to the market, You need to run the Compatibility Test Suite given by android...I need to know how to download and run it..
问题:
回答1:
As XC said in a comment, as of 2.0, the CTS is freely available.
For it to be runnable, you have to build the tests. In your top level android directory, do all the normal build set-up steps and then
make cts Then in the out/host/linux-x86/cts/android-cts/tools sub directory, you will find the startcts bash script. I expect the location might depend on what platform you are building on. Modify it to point out your SDK and then run the script. It is relatively self explanatory.
回答2:
Thanks for all the guides and links above that helps me to setup the CTS successfully.
I using - Android CTS v2.3_r8
I summarize the steps here for those who wish to get CTS up on Windows.
Install cygwin here: http://www.cygwin.com
I placed
android-ctsin mycygwinfolder e.g.C:\cygwin\home\Username\. You may set up accordingly if you have placed it elsewhere.Create new Environment Variables to point to SDK_ROOT and CTS_ROOT directories
- Go to Control panel->System -> Advanced tab
- Click on Environment variables
- Click on New to add CTS_ROOTS to system variables and add the path of android-cts to its value
- Do the same for SDK_ROOT and add the path of andriod-sdk to its value
Go to
android-cts\toolsand modify 2 lines in thestartctsscript file as follows [With help from How to run Android's CTS on windows on an emulator but some slight modification that works for meJARS="$(cygpath -w -p ${CTS_LIB}:${DDM_LIB}:${JUNIT_LIB}:${HOSTTEST_LIB})" java ${JAVA_OPTS} -cp ${JARS} com.android.cts.TestHost "$(cygpath -w "${CONFIG}")" "$@" ${DDCONFIG}
Save startcts as Unix file. I use dos2unix.exe downloaded from http://waterlan.home.xs4all.nl/dos2unix.html to convert it to Unix file.
Then, to run CTS
Attach android device to PC
(a) Go to cmd prompt, type
adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk(b) On the device, enable all the
android.deviceadmin.cts.*device administrators under Settings > Location & security > Select device administratorsRun cygwin and go to
android-cts/toolsExecute Android CTS by
./startcts
For how to run the tests in CTS, I refer again to section Working with CTS in the link given the earlier comment by cezio "using-androids-compatibility-test-suite"
回答3:
There is a quite good documentation on Android's source website. Also, some time ago I've wrote small crash course on CTS.
回答4:
As of ICS (4.0), cts has had a bit of a makeover. Now it's called cts-tradefed.
The Google-provided documentation is available here.
For a simple way to get up to speed on using cts-tradefed from your AOSP root directory and a connected device with a matching AOSP build:
make cts cd out/host/$OSDIR/cts/android-cts/tools ./cts-tradefed Here, $OSDIR is either linux-x86, darwin-x86
in the cts-shell:
help list packages list plans run cts --plan CTS run cts --package android.webkit If it's not obvious, you can also use one of the plans or packages listed from list packages or list plans. Hopefully this will be helpful to someone else. It would've been quite helpful for me to find it earlier.