Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
519 views
in Technique[技术] by (71.8m points)

how to choose, in Parasoft cpptest, in command line, the root path of the project?

I have a makefile project that runs fines in several environments:

  • "A" makefile called to compile the sw
  • "A" makefile called to check the sw with parasoft
  • "B" makefile called that calls the "A" makefile to compile the sw
  • "B" makefile called that calls the "A" makefile to check the sw with parasoft
  • "C" makefile called that calls the "B" makefile to compile the sw
  • "C" makefile called that calls the "B" makefile to check the sw with parasoft

There is no issue to compile sw by calling makefile A,B or C. But i get a different BDF wether i call the bdf creation from the A, B or C makefile.

I tried at first with cpptesttrace and now i'm using cpptestscan to build the BDF.

Here are my commands:

make CC="cpptestscan --cpptestscanOutputFile=$parasoft_bdf --cpptestscanProjectName=$parasoft_projectName cc $parasoft_options" static_analysis_parasoft_target #X
cpptestcli -data $parasoft_workspace -bdf $parasoft_bdf -localsettings $parasoft_settings #Y
cpptestcli -data $parasoft_workspace -config "$parasoft_profile" $resources -report $parasoft_report_dir -showdetails -appconsole stdout -localsettings $parasoft_settings #Z

in the BDF, for each case (A,B,C) i get the same 'working_dir' value, but the files are not parsed equally.

depending on the MACHINE that calls cpptest or depending on the makefile itselves, i get a different behavior between A, B and C, after calling firs and second (X and Y) command lines. for instance, i will get this for a first case:

> [0%] Importing 1 build data file project(s)...
> [0%] Importing myProject...
>>    [7%] Opening 'myProject'.
>>    [20%] Setting project description.
>>    [60%] Creating link.
>>    [62%] Refreshing '/myProject/lib'.
>>    [79%] Creating link.
>>    [80%] Refreshing '/myProject'.

this for a second case:

> [0%] Importing 1 build data file project(s)...
> [0%] Importing myProject...
>>    [7%] Opening 'myProject'.
>>    [20%] Setting project description.
>>    [30%] Creating link.
>>    [32%] Refreshing '/myProject/inc'..
>>    [60%] Creating link.
>>    [62%] Refreshing '/myProject/src'.

>>    [79%] Creating link.
>>    [80%] Refreshing '/myProject'.

this for another case:

> [0%] Importing 1 build data file project(s)...
> [0%] Importing myProject...
>>    [7%] Opening 'myProject'.
>>    [20%] Setting project description.
>>    [79%] Creating link.
>>    [80%] Refreshing '/myProject'.
There is no source file in the project

I don't understand how myProject ($parasoft_projectName) absolute path is choosen.

How can I change it manually?

question from:https://stackoverflow.com/questions/65670973/how-to-choose-in-parasoft-cpptest-in-command-line-the-root-path-of-the-projec

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...