Project depending on build running on same machine


I have a set of NUnit tests which are run using a NAnt runner. The NUnit project is set up to depend on our main build. The two projects share the same build directory, and the main build project builds the NUnit.dll. All the NAnt runner should do is run the tests, like this:

<test assemblyname="bin/Debug/$.dll" appconfig="App.config"/>

This works fine, except that changes to the NUnit code is not picked up immediately. From the title you may understand why. Sometimes the main build runs on machine A, and the unit tests run on machine B.

Is there any way I can declare that the nunit project must run on the same machine as the last build (without fixing them both to a single machine)?

1 comment
Comment actions Permalink


The proper way of splitting the build into preparation/compilation and tests running seems to be to depend the test build on the artifacts (assemblies, test data) prepared by the preparation build. This will remove single agent requirement, but will include transferring the artifacts to the server and to the agent.

Alternatively, you can restrict both build configurations to be compatible only with a single build agent, which imposes obvious restrictions.

Other then that, there is no special feature to enforce configuration to be run on the same agent.

Here is an issue to address the feature that you can watch/vote for..

Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.