SAFS Init Files
There're many deployment files for configuration. We need to learn how SAFS read these depolyment files.
Let's use the IBT as the a small example for reading UseMultiThreadSearch parameter which determines if we use multi-thread algorithm for image comparing.
In the DefaultDriver.java, define a variable USE_MULTIPLE_THREADS to store client's choice about using multi-thread:
/**
* Set true if image searches using BitTolerance
* should attempt to use parallel threading.
* The current implementation of multi-threading is poor,
* and may actually be slower than NOT using multi-threading.
* Current default is 'false'.
* @see org.safs.image.SmallPieceComparator
* @see org.safs.image.ScreenXYBTComparator
*/
public static boolean USE_MULTIPLE_THREADS = false;
Then, in the DefaultDriver.java file, the initializeMiscConfigInfo() method will call configInfo's getNamedValue() method to read the configuration files. So in order to get client's choice of whether use multi-thread, we'll do:
String useMultiThread = configInfo.getNamedValue(DriverConstant.SECTION_SAFS_IBT, "UseMultiThreadSearch");
if(useMultiThread!=null) {
ImageUtils.USE_MULTIPLE_THREADS = StringUtilities.convertBool(useMultiThread);
Log.info("SAFS_IBT:UseMultiThreadSearch set to: "+ ImageUtils.USE_MULTIPLE_THREADS);
}
The corresponding test.ini file should be written like this:
[SAFS_IBT]
UseTwoDimensionMatch=true
Obviously the [SAFS_IBT] is determined by parameter DriverConstant.SECTION_SAFS_IBT in configInfo.getNamedValue() method.
In org.safs.tools.drivers.DriverConstant.java, one constant DEFAULT_PROJECT_DATAPOOL is used to store test tables and app maps. Generally, all inputs except benchmarks are placed here.
Then, in org.safs.tools.drivers.AbstractDriver.java, in AbstractDriver class, the variable datapoolSource will use the DEFAULT_PROJECT_DATAPOOL as default value. In the method validateRootConfigureParameters() of AbstractDriver class, it will call:
datapoolSource = getProjectDirectoryInfo (configInfo.getNamedValue (
DriverConstant.SECTION_SAFS_DIRECTORIES, "DataDir"),
DriverConstant.DEFAULT_PROJECT_DATAPOOL);
for setting.
In jsafs.validateRootConfigureParameters() using datapoolSource = getProjectDirectoryInfo() get the directory of MAP files.
SAFS Init Files的更多相关文章
- saltstack之(七)配置管理系统初始化init
saltstack的配置管理分环境管理:①.base为基础环境,一般会存放一些所有服务器都使用的配置管理信息.②.dev为开发测试环境,一般会存放一些开发测试服务器使用的配置管理信息.③.pro为线上 ...
- saltstack简单部署和实践
#Elaine:master;Dylan:minion#利用salt给minion安装包[root@elaine states]# vim /etc/salt/master default_inclu ...
- 使用Githua管理代码
原创博客:转载请标明出处:http://www.cnblogs.com/zxouxuewei/ 1.安装配置git服务器 a.安装ssh,因为git是基于ssh协议的,所以必须先装ssh: ...
- error: src refspec master does not match any. 错误处理办法
自从上次学了git之后,很少用.今天在使用 本地仓库使用如下命令初始化: $ git init 之后使用如下命令添加远程库: $ git remote add origin git@github.co ...
- web工作流
web工作流之Gulp学习 Gulp.js 是一个自动化构建工具,开发者可以使用它在项目开发过程中自动执行常见任务. Gulp.js 是基于 Node.js 构建的,利用 Node.js 流的威力,你 ...
- SaltStack项目实战(六)
SaltStack项目实战 系统架构图 一.初始化 1.salt环境配置,定义基础环境.生产环境(base.prod) vim /etc/salt/master 修改file_roots file_r ...
- gulp进阶构建项目由浅入深
gulp进阶构建项目由浅入深 阅读目录 gulp基本安装和使用 gulp API介绍 Gulp.src(globs[,options]) gulp.dest(path[,options]) gulp. ...
- SaltStack实战
SaltStack实战 #安装 安装注意几点 python-libs-2.6.6-64.el6.x86_64 conflicts with file from package python-2.6.6 ...
- linux hugepage
The intent of this file is to give a brief summary of hugetlbpage support inthe Linux kernel. This ...
随机推荐
- 关于Android中混淆的问题
1.签名打包后库依赖报错,提示找不到依赖库的方法. 原因:混淆,依赖库的方法被混淆了. 解决方法:过滤混淆,即不要混淆这依赖库的文件. -keep class de.greenrobot.event. ...
- hibernate进行多表联合查询
hibernate是按照hql语句来进行查询的, 里面所使用的表名, 其实是实体类的名字, hql语句的写法并没有多大差别, 是在返回结果的时候要稍微做一些处理 //使用hibernate进行多表查询 ...
- SAP 设置周期性的后台程序,SM36,图解操作 (转)
SM36是设置SAP周期性运行的事务码 来测试一下,首先先写一个程序: 我有一个zzp_people2的数据表. DATA : INT1 TYPE I. DATA : ITAB LIKE ZZP_PE ...
- Rsync+inotify实现实时同步
1.1 inotify介绍 inotify是一种强大的.细粒度的.异步的文件系统事件控制机制.linux内核从2.6.13起,加入了inotify支持,通过inotify可以监控文件系统中添加.删除. ...
- 咏南WEB开发框架(FOR XE10.1 BERLIN)
咏南WEB开发框架(FOR XE10.1 BERLIN) 1)支持最新的XE10.1 BERLIN开发WEB程序 2)如同开发VCL WIN32程序一样的速度 3)WEB框架通过咏南中间件和数据库打交 ...
- Grandpa's Estate---POJ1228(凸包)
http://poj.org/problem?id=1228 学长说这是稳定凸包,我感觉就是凸包嘛. 所谓稳定就是判断能不能在原有凸包上加点,得到一个更大的凸包,并且这个凸包包含原有凸包上的所有点.知 ...
- Intellij Idea 12 开发Android 报Caused by: java.lang.UnsatisfiedLinkError: FindLibrary return null;
这次开发是用的百度地图api,导入两个so文件,结果启动的时候总是报Caused by: java.lang.UnsatisfiedLinkError: findlibrary return null ...
- NOIP2013 题解
转圈游戏 题解:快速幂 #include <cstdio> int n, m, k, x; inline long long QuickPow(int a, int k, int MOD) ...
- 黑马程序员_Java基础:实现多线程对共有数据的同步操作
------- android培训.java培训.期待与您交流! ---------- 实现多线程对共有数据的同步操作,主要涉及到多线程和同步. 虽然都是基础,但是这把刀还是要用熟练,等到使用的时候才 ...
- Maven + 最新SSM整合
. 1. 开发环境搭建 参考博文:Eclipse4.6(Neon) + Tomcat8 + MAVEN3.3.9 + SVN项目完整环境搭建 2. Maven Web项目创建 2.1. 2.2. 2. ...