How to integrate Purify into Hudson CI?

Posted by Martin on Stack Overflow See other posts from Stack Overflow or by Martin
Published on 2010-03-04T09:26:21Z Indexed on 2010/03/22 12:31 UTC
Read the original article Hit count: 432

Hello everybody!

I have a Hudson CI system set up and for the moment it is used for building a project and running some unit tests. My next step is to integrate the memory leak detector Purify into the build cycle. Now I want to start the unit tests also inside purify and for this I have created a new batch task which runs following command:

purify.exe /SaveTextData MyExecutable.exe --test TestLibrary.dll --output xml

As I read in the Purify documentation the /SaveTextData option is used in order to run purify not in GUI mode. If I run this command on my local workstation in the command line it works perfectly. But in case it is started by Hudson, nothing happens. Unfortunetly there are no logs of purify...

Has someone ever tried to start purify either by Hudson or any other CI system?

Thanks in advance.

Best regards

Martin

EDIT: I forgot to tell you, that I have Hudson running as master and slave on different computers. On the master I have configured a task which should start the unit tests within purify on the slave. I am running the slave via JNLP.

EDIT 18.03.2010:

Ok, so finally I am a bit closer the source of the problem.

I have discovered, that running my unit tests in purify locally the log file EngineCmdLine.log contains three commands.

I am starting purify with following command:

purify.exe /SaveTextData TestRunnerConsoleWD.exe --test TestDemoWD.dll

Output of EngineCmdLine.log when starting purify manually:

File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestRunnerConsoleWD.exe

File: C:\WINDOWS\system32\ws2_32.dll

File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll

Output when starting via Hudson:

File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestRunnerConsoleWD.exe File: C:\WINDOWS\system32\ws2_32.dll

File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll

File: D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll

The error output of purify:

Instrumenting: BtcTestDemoWD.dll 313856 bytes

Purify: While processing file > D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TESTFWWD.DLL:

Error: Cannot replace file c:\Programme\IBM\RationalPurifyPlus\PurifyPlus\cache\BTCTESTFWWD$Purify_D_workspace_hudson_workspace_Purify_TestFW_CommonsCoreTest_Cpp_msvs9.DLL.

Is it in use?

TESTFWWD.DLL 505344 bytes

Unable to instrument D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll (0x1)

Question is, why is purify starting twice a command with the TestDemoWD.dll library?

© Stack Overflow or respective owner

Related posts about continuous-integration

Related posts about hudson