从 2.0 开始,cts 可以从 android 的存储库免费下载。
但没有相关文件。
谁能告诉我:
- 如何构建cts?有标准程序吗?
- 如何运行cts?
- 如何添加自定义测试用例?
在这里,分享一下我的经验。
回购同步所有源后,您无法直接运行“make”来构建所有源。
你会得到一些错误。
现在,我尝试首先构建不带cts的android源代码,然后单独构建cts。
另外,这里有一些运行 cts 的参考:
- http://i-miss-erin.blogspot.com/2010/05/how-to-add-test-plan-package-to-android.html
- www.mentby。 com/chenny/how-does-cts-work-where-can-i-get-the-test-streams.html
- www.jxva.com/?act=blog!article&articleId=157
第一次更新 @ 5-13 18:39 +8:00
我执行以下步骤:
1.构建不带cts的android源(将cts移出$SDK_ROOT)。
2.build cts(将cts移回)。
jdk1.5和1.6都有如下错误:
1.第一次“make cts”报告:
“原因是:
java.io.FileNotFoundException: ...(太
许多打开的文件)”
2.第二次“make cts”报告:
“acp:文件
'out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/tests/data'
不存在”
3.第3次“make cts”报告:
"/bin/bash: 第 0 行: cd:
out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/hostjunit_files/classes:
没有这样的文件或目录”
4.最后一次“make cts”报告:
“zip 错误:无能为力!(尝试:zip
-q -r ../../android.core.vm-tests.jar 。 -i .)"
From 2.0 the cts is freely downloadable from android's repository.
But there is no documents about it.
Does anyone can tell me:
- how to build cts? Is there a standard procedure?
- How to run cts?
- How to add customized test case?
Here, share my experience.
After repo sync all source, you can't directly run "make" to build all source.
You will get some errors.
Now, I'am trying to first build android source without cts, and then build cts alone.
Also, here are some reference for run cts:
- http://i-miss-erin.blogspot.com/2010/05/how-to-add-test-plan-package-to-android.html
- www.mentby.com/chenny/how-does-cts-work-where-can-i-get-the-test-streams.html
- www.jxva.com/?act=blog!article&articleId=157
1st time Update @ 5-13 18:39 +8:00
I do the following steps:
1.build android source without cts (move cts out of the $SDK_ROOT).
2.build cts (move cts back).
both jdk1.5 and 1.6 have the following errors:
1.The 1st time "make cts" report:
"Caused by:
java.io.FileNotFoundException: ...(Too
many open files)"
2.The 2nd time "make cts" report:
"acp: file
'out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/tests/data'
does not exist"
3.The 3rd time "make cts" report:
"/bin/bash: line 0: cd:
out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/hostjunit_files/classes:
No such file or directory"
4.The last time "make cts" report:
"zip error: Nothing to do! (try: zip
-q -r ../../android.core.vm-tests.jar . -i .)"
发布评论
评论(2)
在运行 CTS 之前,
1) 确保您安装了最新版本的 Android 调试桥 (adb) 和 Android 资产打包工具 (AAPT)
2) 确保您至少拥有 Android CTS 版本 (android -cts-7.0_r13) SDK 安装在您的计算机上。
下载CTS版本:-https://source.android.com/compatibility/cts/downloads
运行 CTS:-
1) 设置 SDK 路径:-
2) 进入 CTS SDK 的工具目录
android- cts/tools
3) 运行 tradefed 脚本文件
./cts- tradefed
4) 执行 CTS 命令
run cts -m
构建 CTS 源代码:-< /strong>
下载 cts 源代码:
编译完整的 cts 包:
编译特定的 cts:
编译副本测试用例文件后:
/home/apuser/android-cts-8.0_r1/out/host/linux-x86/cts/android-cts/testcases/
将其替换为以下路径(ubantu/linux系统)
/android-cts-8.0_r1/测试用例/
Before running the CTS,
1) Make sure you have recent versions of both Android Debug Bridge (adb) and Android Asset Packaging Tool (AAPT) installed
2) Make sure you have atleast the Android CTS version (android-cts-7.0_r13) SDK installed on your machine.
Download the CTS version:-https://source.android.com/compatibility/cts/downloads
Run CTS:-
1) Set the SDK path:-
2) Go to the tools director of CTS SDK
android- cts/tools
3) Run the tradefed script file
./cts-tradefed
4) Execute the CTS command
run cts -m <module_name>
Build CTS source code :-
Download cts source code :
Compile complete cts package:
Compile particular cts :
After compiling the copy test case file :
/home/apuser/android-cts-8.0_r1/out/host/linux-x86/cts/android-cts/testcases/
Replace them at below path(ubantu/linux system)
/android-cts-8.0_r1/testcases/
不仅需要SDK,还需要Android构建系统,您可以从Android站点进行设置。
这是另一个CTS介绍 关于构建 CTS。
Not only SDK, it need Android building system, you could set it up from Android site.
Here is another CTS introduction about building CTS.