Ubuntu14.04编译TradeFederation
来源:互联网 发布:西安交大远程网络教育 编辑:程序博客网 时间:2024/06/06 20:20
TradeFederation(后面简称TF)是android一个非常强大到测试框架,CTS,GTS,VTS上都用此框架进行各种测试,CTS测试case打包成jar,运行测试需要到配置文件以config(类似xml)形式一起放在本地PC,tradefederation利用java的反射机制执行case,并完成对结果到汇总。
直接下载到源码包里面并不包含tradefederation代码,需要另外下载,而且编译过程中会有一些依赖库也不是android源码默认下载的,但是android官方已经提供,只是找到需要到依赖文件下载再重新编译就可以了。
1.TF官方介绍,以及build方法参考如下链接:
https://source.android.com/devices/tech/test_infra/tradefed/
TF源码:
https://android.googlesource.com/platform/tools/tradefederation/
2.参考官方提供到源码build说明,搭建好编译环境:
https://source.android.com/source/downloading
下载android源码(这里下载的分支为android-7.0.0_r33)
repo init -u https://android.googlesource.com/platform/manifest -b android-7.0.0_r333.源码下载完成后,在Ubuntu terminal里面进入源码下的tools目录,下载对应分支的TF
git clone https://android.googlesource.com/platform/tools/tradefederation -b android-7.0.0_r33打开TF的Android.mk文件,需要依赖loganalysis。
LOCAL_JAVA_LIBRARIES := emmalib tools-common-prebuilt loganalysis
4.下载loganalysis到tools目录,与TF在同一个目录,loganalysis是TF的依赖库,如果没有编译汇报错(如最下方第八条);
git clone https://android.googlesource.com/platform/tools/loganalysis -b android-7.0.0_r33
5.下载jline到android源码的external目录,Android.mk文件中有说明jline是静态库文件:
LOCAL_STATIC_JAVA_LIBRARIES := junit kxml2-2.3.0 jline-1.0 tf-remote-client
git clone https://android.googlesource.com/platform/external/jline -b android-7.0.0_r33
6.参考官方提供的build说明进行build:
TF is a test harness used to drive Android automated testing. It runs on test hosts and monitors the connected devices, handling test scheduling & execution and device management.
Other test harnesses like Compatibility Test Suite (CTS) and Vendor Test Suite (VTS) use TF as a basis and extend it for their particular needs.
Building TF:
- source build/envsetup.sh
- tapas tradefed-all
- make -j8
8.缺少loganalysis报错:
ninja: Entering directory `.'
ninja: error: 'out/host/linux-x86/framwork/loganalysis.jar', needed by 'out/host/common/obj/JAVA_LIBRARIES/tradefed_intermediates/classes-full-debug.jar', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
缺少jline报错:
ninja: Entering directory `.'
ninja: error: 'out/host/common/obj/JAVA_LIBRARIES/jline-1.0_intermediates/javalib.jar', needed by 'out/host/common/obj/JAVA_LIBRARIES/tradefed_intermediates/classes-full-debug.jar', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
- Ubuntu14.04编译TradeFederation
- Ubuntu14.04 编译openjdk7u6
- Ubuntu14.04 Chromium 编译
- ubuntu14.04编译virtualbox
- ubuntu14.04编译webrtc
- Ubuntu14.04编译Webrtc
- ubuntu14.04编译PTAM
- ubuntu14.04编译caffe
- ubuntu14.04 编译caffe
- ubuntu14.04编译openjdk7
- ubuntu14.04编译WebKit源代码
- openwrt Ubuntu14.04编译流程
- Ubuntu14.04编译Andorid源码
- ubuntu14.04编译Android4.4
- Ubuntu14.04 OpenCV编译安装
- Ubuntu14.04 Android 源码编译
- ubuntu14.04 编译安装ceph
- ubuntu14.04编译android源码
- apache文件上传组件
- K:注解语法简介
- 深入理解JVM(一)-JVM内存模型
- HihoCoder 1251 BFS预处理
- 深入理解JVM(二)-类加载机制
- Ubuntu14.04编译TradeFederation
- make pycaffe遇到致命错误No such file or directory Python.h
- 跟hashmap有关的算法题
- 【BZOJ2729】【HNOI2012】排队(组合数学)
- git基础指令
- HDU 5556 Land of Farms(枚举+二分图匹配)
- leetcode---combination-sum---dfs
- K:注解处理
- 栈的实现及应用学习笔记--Java实现