views:

8

answers:

0

I'm using TeamCity 5 with Git VCS and Visual Studio 2010 SLN build runner.

My solution has a class library proj containing a number of XUnit 1.5 tests. The post build event on this project runs the tests

$(SolutionDir)libs\XUnit-1.5\xunit.console.exe $(SolutionDir)MyTestProj\$(OutDir)\MyTestProj.dll

This works fine for running all my tests on my dev machine, and runs fine on the TeamCity build agent.

However, I recently added a new XUnit test function to this project, committed it to github, which was picked up by TeamCity and a build was run. But the new test was not included in the run.

It appears that the source is checked out to a different directory (e.g. c:\checkedoutsource) to my git repository (c:\my_source), and when the SLN build runner builds my solution, the post build event 'run tests' is targeting the c:\checkedoutsource\bin\debug\MyTestProj.dll and not c:\my_source\bin\debug\MyTestProj.dll

Anyone have any suggestions of how to get TeamCity to build my test project and run the post build event against the newly created test assembly?? (without writing mahoosive MSBuild script files).

i.e. is it possible to set visual studio variables such as $(SolutionDir) in the build runner?

Hope that made sense, thanks