摘要
测试用例执行框架是代码测试系统(Code Testing System CTS)的重要组成部分,用于执行测试用例,捕获插装结果。在CTS系统从Windows平台向Linux平台移植的过程中,测试用例执行框架遇到了线程调用和控制不兼容,异常捕获失败以及代码编译不通过等问题。本文通过使用Linux平台上常用的Pthread线程库,解决线程调用问题,通过设计并实现异常栈解决C语言异常捕获失败的问题,通过解析被测单元所在C语言工程的makefile文件,提取出编译需要的头文件及链接共享库或静态链接库需要的链接选项,解决测试用例执行框架编译失败的问题。通过解决上述问题,CTS的测试用例执行框架能够在Linux平台上正常运行。
Test case execution framework is part of CTS(Code Testing System).It is used to execute the test cases and capture instrument result. When CTS transplants from Windows platform to Linux platform,the test case execution framework encountered some problems, like thread system calls is not compatible to Linux Platform, exception capture failed and the source code of framework compiled failure. Pthread was used to make thread system calls available, and a exception stack was designed to solve exception capture problem, and the makeifle is parsed to extract head include ifles and lib options so that we can compile the source code successfully. The test case execution framework can run in Linux Platform.
出处
《软件》
2013年第12期14-17,共4页
Software
基金
国家自然科学基金资助项目(No.61202080)
863项目(No.2012AA011201)
计算机体系结构国家重点实验室开放基金(No.CARCH201201)