Question

I have a project that is being built using CruiseControl.NET. The project contains an 'MSBuild task' that runs the build for the project and also the unit tests. The unit test in turn is just a MSBuild 'exec' task that runs an executable.

The unit test involves some .NET remoting. And when the unit tests are run through the system command prompt, the software's window opens up, tests run and the process exits.

When I force a build through the web dashboard, the build hangs at the point where the unit test starts running. The software's window does not open up, but the executable is running. If the process is killed through the task explorer, the build goes through with a 'Failure' status. This happens when I run ccnet as a windows service.

If I run CCNet directly (not as a windows service) and force a build through the web dashboard, the build and unit tests go through fine as expected. (with the window of the software opening up.)

It looks like there is a deadlock in the case where CCNet is run as a windows service. I am guessing it is related to the standard output/error streams.

  1. Is this is known problem?

  2. What might be the problem going on?

  3. Any suggestions on debugging this?

  4. How can I get around it?

(I am using CCNet version 1.4.4 SP1)

Was it helpful?

Solution

When CCNet is running as a service it is not going to have access to the display, so don't expect to see anything on the screen in this configuration. The first thing I would check is the permissions - make sure the service runs as an account that has permissions to access whatever resources you need. You also have CCNet log files, which you can find via Dashboard.

On a side note, try TeamCity instead of CCNet, its 10 years ahead.

OTHER TIPS

Maybe this answer will help : delphi windows service can't download file from internet

You should know that when running CCNet as an application (the dosbox) it uses the environment variables and all rights from the logged account. So it may connect to a server, use cached passwords, get registry variables for this account.

BUT when ran as a service, the account is the one you provided : LocalSystem for exampe, where env. varibales are not the same.

So, what you can do is to change the CCNet service account for test. Change it to your user account (with password), and I'm sure it will work better !

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top