-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge final changes for alpha-3 release
- Loading branch information
Showing
11 changed files
with
196 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,42 @@ | ||
Building NUnit 3.0 | ||
|
||
NUnit 3.0 consists of three separate layers: the Framework, the Engine and the Console Runner. There is a Visual Studio solution and a NAnt build script for each of these. Eventually, the three layers will be independent projects. For now, they are developed in a single repository and have some dependencies. | ||
|
||
The solutions all place their output in a common bin directory. In order to satisfy all references you must first build the framework, then the engine and finally the console runner. | ||
|
||
For the time being, there is also a combined solutions and a combined script, making it easier to work on the overall initial development of NUnit 3.0. | ||
|
||
The following guidelines are provided for developers working on NUnit: | ||
|
||
1. When working on changes to the Framework alone, use the NUnitFramework solution and/or NAnt script. Examples of such changes might be new constraints and new or modified attributes. This is probably the most common sort of change that you will need to make. | ||
|
||
2. NUnitLite is built as a part of the framework layer and makes no use of the engine or console layers. Consequently, changes to NUnitLite must also be made at this level. | ||
|
||
3. When working on changes to the Engine alone, use the NUnitEngine solution and/or NAnt script. An example of such a change would be to support an additional framework or to run tests on a remote system. Such changes should be somewhat rare once the Engine is released. | ||
|
||
4. When working on changes to the Console Runner alone, use the NUnitConsole solution and/or NAnt script. Changes to the report output produced by the runner would be an example of such a change. | ||
|
||
5. When changes involve multiple levels, it is recommended that you develop | ||
and test the individual pieces using the single-component solutions or scripts and then use the combined solution or script to ensure that it all works together. | ||
|
||
Further guidelines are given below for each layer and for the combined solution/scripts. | ||
|
||
Framework Layer | ||
|
||
The NUnitFramework build produces the following assemblies: | ||
* nunit.framework.dll - the framework itself | ||
* nunit.framework.tests.dll - tests of the framework | ||
* nunit.testdata.dll - data used by the tests | ||
* nunitlite.dll - the NUnitLite framework | ||
* nunitlite.tests.dll - tests of the NUnitLite framework | ||
* nunitlite.testdata.dll - data used by the NUnitLite tests | ||
* direct-runner.exe - test harness used to run framework tests | ||
* mock-assembly.dll - a test assembly used by some of the tests | ||
Each of these is built for three targets: .NET 2.0, .NET 3.5 and .NET 4.0. Features requiring either .NET 3.5 or .NET 4.0 are excluded from lesser builds by the use of conditional tests. | ||
|
||
The NUnitFramework solution builds each of the assemblies for each target for a total of 24 assemblies. The output assemblies for each target are stored in a separate subdirectory under the shared bin directory used by all of the solutions. | ||
|
||
The NAnt build for each target stores its output in separate subdirectories of the NUnitFramework/build directory. The 'deploy' target copies the output to a higher level shared directory for use in combined tests. The 'deploy-test' target runs tests in the deploy directory. | ||
|
||
Whenever changes are made, it's important to run all tests and to ensure that both the solutions and the nant scripts are updated as needed. The NAnt test | ||
target runs tests for both full NUnit and NUnitLite. When using the solutions, it is necessary to run them separately to ensure that everything is working. | ||
|
||
Engine Layer | ||
|
||
The Engine build produces the following assemblies: | ||
* nunit.engine.dll - the engine itself | ||
* nunit.engine.api.dll - the api assembly referenced by runners | ||
* nunit-agent.exe - the agent used for running tests in a separate process | ||
* nunit.engine.tests.dll - tests of the engine | ||
Engine components are all built with a target of .NET 2.0. | ||
|
||
The NUnitEngine solution builds all the engine assemblies. It produces output in the shared bin directory and references the .NET 2.0 builds of nunit.framework.dll and mock-assembly.dll. In addition, the 2.0 build of direct-runner.exe is copied to the bin directory in order to run the tests. | ||
|
||
The NAnt build script puts the engine assemblies into the NUnitEngine/build directory. The 'deploy' target copies the output to the higher level deploy directory. The 'deploy-test' target runs tests in the deploy directory. | ||
|
||
Console Layer | ||
|
||
The Console Runner build produces the following assemblies: | ||
* nunit-console.exe | ||
* nunit-console.tests.dll | ||
All assemblies are built with a target of .NET 2.0. | ||
|
||
The NUnitConsole solution produces output in the shared bin directory. The tests reference nunit.framework.dll. The console runner itself is used to execute its own tests. | ||
|
||
The NAnt build script produces output in the NUnitConsole/build directory. The 'deploy' target copies the output to the higner level deploy directory. The 'deploy-test' target runs tests in the deploy directory. | ||
|
||
Combined Solution and Scripts | ||
|
||
The nunit.sln file builds includes all assemblies from the other three solutions with the exception of those related to NUnitLite. The Console runner is used to execute tests in the NUnitTests.nunit project file, which contains separate configs for testing under .NET 2.0, 3.5 and 4.0. | ||
|
||
The master NAnt script, nunit.build, uses the three lower-level scripts to build and deploy the NUnit assemblies and run tests under the console runner. | ||
Separate console executions are used to run tests for the Console, the Engine and the Framework. Framework tests are run under each of the supported platforms that is available on the build machine. | ||
NUnit 3.0 consists of three separate layers: the Framework, the Engine and the Console Runner. | ||
The source code is kept in a single GitHub repository at http://github.com/nunit/nunit.git. | ||
|
||
All three layers are built together using a single Visual Studio solution (nunit.sln on Windows | ||
and nunit.linux.sln on Linux), whichn may be built with Visual Studio 2012+, SharpDevelop. | ||
or MonoDevelop. | ||
|
||
There is a separate VS2008 solution for building the framework to run under the .NET | ||
compact framework 3.5. | ||
|
||
The solutions all place their output in a common bin directory. Console runner and engine | ||
components are placed directly in the bin directory while framework components end up in | ||
subdirectories net-2.0, net-3.5, net4.0, sl-5.0, portable and netcf-3.5. Future platform | ||
builds will cause new subdirectories to be created. | ||
|
||
The build shell script and build.cmd script are provided as an easy way to locate and | ||
run msbuild / xbuild. They pass their arguments directly to msbuild / xbuild. | ||
|
||
Note that assemblies in one layer must not reference those in any other layer, except as follows: | ||
* The console runner references the nunit.engine.api assembly, but not the nunit.engine assembly. | ||
* Tests in any layer reference nunit.framework. | ||
Developers should make sure not to introduce any other references. | ||
|
||
There is an MsBuild script (NUnit.proj) that can do builds as well as running tests | ||
and packaging releases. It can be run under MsBuild or XBuild. The most important | ||
targets are CleanAll, BuildAll, TestAll and Package. For other targets, please | ||
refer to the script itself. | ||
|
||
To create a new release: | ||
* Update CHANGES.txt with the latest changes. | ||
* Update NUnit.proj to specify the release version and suffix using property definitions | ||
near the start of the script. | ||
* Use Visual Studio 2012 or higher to rebuild everything for the Release configuration. | ||
(The NUnit.proj script currently does not build everything due to a bug.) | ||
* Retest the build using 'build NUnit.proj /t:TestAll /p:Configuration=Release' | ||
* Use Visual Studio 2008 to rebuild the nunitCF solution and test manually using an emulator. | ||
* Run 'build NUnit.proj /t:Package /p:Configuration=Release' to create packages | ||
* Create the release on GitHub and upload the binary zip, source zip and three NuGet packages. | ||
* Upload the three NuGet packages to NuGet.org. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.