forked from nunit/nunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILDING.txt
74 lines (47 loc) · 5.5 KB
/
BUILDING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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.