Thursday 16 April 2009

Getting testing working

OK, so I have the source checked out, and then I have built it. I even have a test application, that outputs XML. However, we have a graphical login. So I need to be able to pass in the signon somehow. OK, so I need to think a bit more about this.

Tuesday 7 April 2009

Cruisecontrol.net howto (draft)

This is a draft of what I had to do to get CruiseControl.Net and Delphi to play nicely - I will fill out the details later!

1. Install Apache 2.
2. Install Mod_ASPDotNet.
3. Install CruiseControl.Net.
4. Install CCTray.
5. Create a project to test.
7. Setup connection to Seapine Surround.
8. Setup the MSBuild section to build the application.
9. Modify the DUnit tests to output XML.

This I did using the entry above, and changed the base UnitTest program code to look like this:

var
res : TTestResult;

...

if IsConsole then
if ParamCount <> 0 then
if (copy(ParamStr(1), 0, 5) = '/xml=') then
res := XMLTestRunner.RunRegisteredTests(copy(ParamStr(1), 6, length(ParamStr(1)) -5))
else
res := TextTestRunner.RunRegisteredTests
else
res := TextTestRunner.RunRegisteredTests
else
GUITestRunner.RunRegisteredTests;

if (res.ErrorCount <> 0) then
halt (1);



More later!

Monday 6 April 2009

CI Update

Well, after much messing about I now have CI working for Delphi. It checks out the code from Surround (easy to configure), calls MSBuild (again easy), and this then compiles the Delphi source (tricky and required me to mess about and reinstall CruiseControl.NET). It now checks out 5 projects (3 of which compile, 1 fails due to a missed file, and 1 needs an project to be registered), which is about what I expected.

Hurrah!

Saturday 4 April 2009

Cruisecontrol.net update

Well, I have CCNet working and trying to build (but failing) Delphi 2009 code, using MSBuild, good news I found out what was wrong, the bad news was I had to hack the CC.NET source to get this to work.

The cause of the problems was that Delphi 2009 uses the brcc32.exe to build its resources, which is obviously fine, but when the code is downloaded from Surround, it is read-only, so it create lots of .tmp files, all of which are read-only and so can't be written to. I downloaded the CC.NET source and changed the command line that is passed to Surround to checkout the code as read-write, and now the code compilation gets passed this.

However, I am now stuck with MSBuild working from the command line, but not when run from CC.NET. Ho hum, I'm sure I can figure this out as well. Nothing is ever easy!

Wednesday 1 April 2009

CI with Delphi

I am trying to get CruiseControl.NET to connect to a Surround SCM system and then check out and build (and then test if possible) projects.

It was simple to install, but it needs as ASP.NET server to work (or so it seems). I've installed Apache and the mod_asp (or whatever it is called), and have got a simple ASP script to work, but can't get the CC.NET dashboard application to run.

More news as it breaks.

Update 1

I now have access to the CC.NET dashboard working. I can't get the command line that CC.NET builds to be correct, the settings seem OK, but I get the following ...

Process command: E:\Program Files\Seapine\Surround SCM\sscm.exe cc * -d20090401153253:20090401153326 -r -bXXXX -p"XXXXXX" -x- -zABCABCDABCDEF:4900 -y"XXX:XXX"


Update 2

Fixed the file locations, and started up the VPN, and now CruiseControl downloads the latest source, and tries to rebuild - the MSBuild process now gives the following error:


E:\Documents\Mark\CCBuildDir\SSCMClone\D2009\XXXX\XXXX\XXXXX.dproj (,):

errorMSB4057: The target "Rebuild" does not exist in the project.


So we are getting much closer, and this might be working before I go back to work

Continuous Integration and Delphi

Continuous Integration and Delphi using CruiseControl