亲身实践:
方法1:
%install path%/cpptesttrace --cpptesttraceOutputFile=<Pathto ATM project>/output.bdf
--cpptesttraceProjectName=ATM make
方法2:
修改MakeFile如下:
#CC=g++
ifeq ($(BUILD_MODE),PARASOFT_CPPTEST)
CC='D:\sunray\parasoft\install\Parasoft\c++\Parasoft\C++test\9.4\cpptestscan' --cpptestscanOutputFile=./ATM.bdf --cpptestscanProjectName=ATM gcc
else
CC=gcc
endif
为 make 指定新增的BUILD_MODE 变量:
make BUILD_MODE=PARASOFT_CPPTEST
以下内容为转载:
Windows设置环境变量
add path:
C:\cygwin\bin;C:\Program Files\Parasoft\C++test7.3
Windows下命令行方式生成bdf,创建工程,生成报告:
1motify the makefile
#CC=gcc
ifeq ($(BUILD_MODE),PARASOFT_CPPTEST)
CC='C:\Program Files\Parasoft\C++test7.3\cpptestscan' --cpptestscanOutputFile=./Timer.bdf --cpptestscanProjectName=Timer gcc
else
CC=gcc
endif
or use command
C:\Program Files\Parasoft\C++test7.3\Examples\Timer>make CC="cpptestscan --cpptestscanOutputFile=./Timer.bdf --cpptestscanProjectName=Timer gcc" clean all
2
C:\Program Files\Parasoft\C++test7.3\Examples\Timer>cpptestcli -resource "Timer" -config "util/CreateProjectOnly" -bdf Timer.bdf
3
C:\Program Files\Parasoft\C++test7.3\Examples\Timer>cpptestcli -resource "Timer" -config "builtin://CRules" -report "Timer_report"