Skip to content

Commit

Permalink
Merge final changes for alpha-3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Nov 29, 2014
2 parents 19e7919 + 1be9f71 commit f908583
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 148 deletions.
110 changes: 39 additions & 71 deletions BUILDING.txt
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.

49 changes: 46 additions & 3 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
NOTE: A combined description of changes since NUnit 2.6.3 is under development along with a summary statement of major features. Both will be available in the next release.

<<<<<<< HEAD
NUnit 3.0.0 Alpha 3 - November 25, 2014
=======
NUnit 3.0.0 Alpha 3 - November 29, 2014

Breaking Changes

* NUnitLite tests must reference both the nunit.framework and nunitlite assemblies.

Framework

* The NUnit and NUnitLite frameworks have now been merged. There is no longer any distinction
between them in terms of features, although some features are not available on all platforms.
* The release includes two new framework builds: compact framework 3.5 and portable. The portable
library is compatible with .NET 4.5, Silverlight 5.0, Windows 8, Windows Phone 8.1,
Windows Phone Silverlight 8, Mono for Android and MonoTouch.
* A number of previously unsupported features are available for the Compact Framework:
- Generic methods as tests
- RegexConstraint
- TimeoutAttribute
- FileAssert, DirectoryAssert and file-related constraints

Engine

* The logic of runtime selection has now changed so that each assembly runs by default
in a separate process using the runtime for which it was built.
* On 64-bit systems, each test process is automatically created as 32-bit or 64-bit,
depending on the platform specified for the test assembly.

Console
* The console runner now runs tests in a separate process per assembly by default. They may
still be run in process or in a single separate process by use of command-line options.
* The console runner now starts in the highest version of the .NET runtime available, making
it simpler to debug tests by specifying that they should run in-process on the command-line.
* The -x86 command-line option is provided to force execution in a 32-bit process on a 64-bit system.
* A writeability check is performed for each output result file before trying to run the tests.
* The -teamcity option is now supported.

Issues Resolved
>>>>>>> 1be9f717592e7196813007fadca133dced4abc22

* 12 Compact framework should support generic methods
* 145 NUnit-console fails if test result message contains invalid xml characters
Expand All @@ -26,7 +65,11 @@ NUnit 3.0.0 Alpha 3 - November 25, 2014
* 337 Update Standard Defines page for .NET 3.0
* 341 Move the NUnitLite runners to separate assemblies
* 367 Refactor XML Escaping Tests
<<<<<<< HEAD
* 372 CF Build TestAsesemblyRunnerTests
=======
* 372 CF Build TestAssemblyRunnerTests
>>>>>>> 1be9f717592e7196813007fadca133dced4abc22
* 373 Minor CF Test Fixes
* 378 Correct documentation for PairwiseAttribute
* 386 Console Output Improvements
Expand Down Expand Up @@ -281,7 +324,7 @@ Bug Fixes in 2.9.6 But Not Listed Here in the Release
* 1222148 /framework switch does not recognize net-4.5
* 1228979 Theories with all test cases inconclusive are not reported as failures

NUnit 2.9.5 - July 30, 2010

Bug Fixes
Expand All @@ -301,7 +344,7 @@ Bug Fixes
* 605432 ToString not working properly for some properties
* 606548 Deprecate Directory Assert in 2.5 and remove it in 3.0
* 608875 NUnit Equality Comparer incorrectly defines equality for Dictionary objects
NUnit 2.9.4 - May 4, 2010

Bug Fixes
Expand All @@ -321,7 +364,7 @@ Bug Fixes
* 556971 Datapoint(s)Attribute should work on IEnumerable<T> as well as on Arrays
* 561436 SetCulture broken with 2.5.4
* 563532 DatapointsAttribute should be allowed on properties and methods
NUnit 2.9.3 - October 26, 2009

Main Features
Expand Down
30 changes: 25 additions & 5 deletions NUnit.proj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup Label="Common Properties">
<ProjectName>$(MSBuildProjectName)</ProjectName>
<PackageVersion>3.0.0</PackageVersion>
<PackageModifier>-alpha-2</PackageModifier>
<PackageModifier>-alpha-3</PackageModifier>
<PackageName>$(ProjectName)-$(PackageVersion)$(PackageModifier)</PackageName>
</PropertyGroup>

Expand Down Expand Up @@ -225,6 +225,10 @@
<Target Name="BuildEngine" Label="Build all engine projects for the current config">
<MSBuild Targets="Build" Projects="@(EngineProjects)"
Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>

<!-- This target is kept separate from the engine because it can't be built on some systems -->
<Target Name="BuildCppTestFiles" Label="Build the C++ assemblies used in some engine tests">
<MSBuild Targets="Build" Projects="$(EngineSrcDir)\mock-cpp-clr\mock-cpp-clr-x86.vcxproj"
Properties="Configuration=$(Configuration); Platform=Win32"
Condition="'$(Runtime)' == 'NET' And $(IsWindows)" />
Expand Down Expand Up @@ -433,11 +437,27 @@

<ItemGroup Label="Files for packaging in bin directory">
<BinFiles Include="$(ConfigurationBuildDir)\**\*.dll" />
<BinFiles Include="$(ConfigurationBuildDir)\**\*.exe" />
<BinFiles Include="$(ConfigurationBuildDir)\**\*.pdb" Condition="'$(Configuration)' == 'Debug'" />
<BinFiles Include="$(ConfigurationBuildDir)\**\*.xml" />
<BinFiles Include="$(ConfigurationBuildDir)\**\*.config" />

<BinFiles Include="$(ConfigurationBuildDir)\**\nunit-console.exe" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit-console.exe.config" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit-agent.exe" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit-agent.exe.config" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit-agent-x86.exe" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit-agent-x86.exe.config" />

<BinFiles Include="$(ConfigurationBuildDir)\**\nunit.framework.xml" />
<BinFiles Include="$(ConfigurationBuildDir)\**\nunit.engine.api.xml" />

<BinFiles Include="$(ConfigurationBuildDir)\NUnit2TestResult.xsd" />

<!-- Extra files for Silverlight build -->
<BinFiles Include="$(ConfigurationBuildDir)\sl-5.0\AppManifest.xaml" />
<BinFiles Include="$(ConfigurationBuildDir)\sl-5.0\nunit.framework.tests.xap" />
<BinFiles Include="$(ConfigurationBuildDir)\sl-5.0\nunit.framework.tests_TestPage.html" />

<!-- Include pdp files for Debug -->
<BinFiles Include="$(ConfigurationBuildDir)\**\*.pdb"
Condition="'$(Configuration)' == 'Debug'" />
</ItemGroup>

<ItemGroup Label="Supported Frameworks">
Expand Down
4 changes: 4 additions & 0 deletions nuget/nunit.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,9 @@
<file src="$builddir$\net-4.0\nunit.framework.xml" target="lib\net40" />
<file src="$builddir$\net-4.5\nunit.framework.dll" target="lib\net45" />
<file src="$builddir$\net-4.5\nunit.framework.xml" target="lib\net45" />
<file src="$builddir$\sl-5.0\nunit.framework.dll" target="lib\sl50" />
<file src="$builddir$\sl-5.0\nunit.framework.xml" target="lib\sl50" />
<file src="$builddir$\portable\nunit.framework.dll" target="lib\portable-net45+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1" />
<file src="$builddir$\portable\nunit.framework.xml" target="lib\portable-net45+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1" />
</files>
</package>
33 changes: 0 additions & 33 deletions nuget/nunit.runners.nuspec

This file was deleted.

0 comments on commit f908583

Please sign in to comment.