Skip to content

Commit b52336c

Browse files
author
Jake Ginnivan
committed
Added build script
1 parent 0b3389a commit b52336c

65 files changed

Lines changed: 580 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ bin
33
obj
44

55
# mstest test results
6-
TestResults
6+
TestResult*
77

88
# Misc
99
_ReSharper.*
@@ -13,3 +13,4 @@ _ReSharper.*
1313
*.crunchsolution.local.xml
1414
*.ncrunchsolution
1515
*.ncrunchproject
16+
ConventionTests*.nupkg

.nuget/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="NuGet.CommandLine" version="2.6.1" />
4+
<package id="NUnit.Runners" version="2.6.2" />
5+
</packages>

Build.cmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@ECHO OFF
2+
3+
SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
4+
5+
%msbuild% ConventionTests.proj
6+
7+
IF NOT ERRORLEVEL 0 EXIT /B %ERRORLEVEL%
8+
9+
pause

ConventionTests.proj

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Test;Publish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Root>$(MSBuildProjectDirectory)\</Root>
5+
<BuildPlatform Condition="$(BuildPlatform) == ''">Any CPU</BuildPlatform>
6+
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
7+
<MSBuildCommunityTasksPath>$(Root)tools\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
8+
</PropertyGroup>
9+
<ItemGroup>
10+
<NUnit Include="$(Root)packages\NUnit.Runners.*\tools\nunit-console.exe" />
11+
<NuGet Include="$(Root)packages\NuGet.CommandLine.*\tools\NuGet.exe" />
12+
</ItemGroup>
13+
14+
<Target Name="Cleanup">
15+
<Error Condition="$(Root) == ''" Text="Root variable must be defined" />
16+
<Error Condition="@(NUnit) == ''" Text="Cannot find nUnit runner" />
17+
<Error Condition="@(NuGet) == ''" Text="Cannot find NuGet command line tool" />
18+
19+
<!-- Diagnostics -->
20+
<Message Text="Diagnostics:"/>
21+
<Message Text="Project root: $(Root)" />
22+
<Message Text="Drop path: build\Artifacts" />
23+
24+
<!-- Clean up -->
25+
<ItemGroup>
26+
<FilesToDelete Include="$(Root)**\bin\**\*.*" />
27+
<FilesToDelete Include="$(Root)**\obj\**\*.*" />
28+
<FilesToDelete Include="$(Root)build\Artifacts\**\*.*" />
29+
</ItemGroup>
30+
<Delete Files="@(FilesToDelete)" ContinueOnError="true" />
31+
<Delete Files="$(Root)build\Artifacts" />
32+
</Target>
33+
34+
<Target Name="Build" DependsOnTargets="Cleanup">
35+
<MSBuild Projects="$(Root)ConventionTests.sln" Properties="Configuration=$(Configuration);Platform=$(BuildPlatform)" />
36+
</Target>
37+
38+
<Target Name="Test" DependsOnTargets="Build">
39+
<Exec Command="@(NUnit) $(Root)TestStack.ConventionTests.Tests\bin\$(Configuration)\TestStack.ConventionTests.Tests.dll" />
40+
</Target>
41+
42+
<Target Name="Publish">
43+
<PropertyGroup>
44+
<Version Condition="'$(Version)' == ''">0.0.0.0</Version>
45+
</PropertyGroup>
46+
<MakeDir Directories="$(Root)build\Artifacts" />
47+
<Exec Command="@(NuGet) pack $(Root)TestStack.ConventionTests\TestStack.ConventionTests.nuspec -Version $(Version) -OutputDir $(Root)build\Artifacts -BasePath $(Root)TestStack.ConventionTests\bin\$(Configuration)" />
48+
</Target>
49+
</Project>

ConventionTests.sln

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@ Microsoft Visual Studio Solution File, Format Version 11.00
33
# Visual Studio 2010
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConventionTests", "ConventionTests\ConventionTests.csproj", "{1E12EA0C-9182-4029-991A-B0B9D38F5783}"
55
EndProject
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AF9054EE-FE89-47A4-9156-BE54A837F2F7}"
7+
ProjectSection(SolutionItems) = preProject
8+
Build.cmd = Build.cmd
9+
ConventionTests.proj = ConventionTests.proj
10+
README.md = README.md
11+
EndProjectSection
12+
EndProject
613
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.ConventionTests", "TestStack.ConventionTests\TestStack.ConventionTests.csproj", "{955B0236-089F-434D-BA02-63A1E24C2B7C}"
714
EndProject
815
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestStack.ConventionTests.Tests", "TestStack.ConventionTests.Tests\TestStack.ConventionTests.Tests.csproj", "{FEFF8305-A192-4CEA-A373-6CF2F365A9E5}"
916
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{35B8E1F6-8E97-40A6-91E3-CB765328424F}"
18+
ProjectSection(SolutionItems) = preProject
19+
.nuget\packages.config = .nuget\packages.config
20+
EndProjectSection
21+
EndProject
1022
Global
1123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1224
Debug|Any CPU = Debug|Any CPU
556 KB
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>NUnit.Runners</id>
5+
<version>2.6.2</version>
6+
<title>NUnit.Runners</title>
7+
<authors>Charlie Poole</authors>
8+
<owners>Charlie Poole</owners>
9+
<licenseUrl>http://nunit.org/nuget/license.html</licenseUrl>
10+
<projectUrl>http://nunit.org/</projectUrl>
11+
<iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible. A number of runners, both from the NUnit project and by third parties, are able to execute NUnit tests.
14+
15+
Version 2.6 is the seventh major release of this well-known and well-tested programming tool.
16+
17+
This package includes the NUnit console, gui and pnunit runners and is compatible with all NUnit framework versions 2.0 through 2.6. The NUnit project editor is also included.</description>
18+
<summary>NUnit is a unit-testing framework for all .Net languages with a strong TDD focus.</summary>
19+
<releaseNotes />
20+
<copyright />
21+
<language>en-US</language>
22+
<tags>test testing tdd runner</tags>
23+
</metadata>
24+
</package>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Copyright � 2002-2012 Charlie Poole
2+
Copyright � 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
3+
Copyright � 2000-2002 Philip A. Craig
4+
5+
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
6+
7+
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
8+
9+
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required.
10+
11+
Portions Copyright � 2002-2012 Charlie Poole or Copyright � 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright � 2000-2002 Philip A. Craig
12+
13+
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
14+
15+
3. This notice may not be removed or altered from any source distribution.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<AgentConfig>
2+
<Port>8080</Port>
3+
<PathToAssemblies>.</PathToAssemblies>
4+
</AgentConfig>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<log4net>
2+
<!-- A1 is set to be a ConsoleAppender -->
3+
<appender name="A1" type="log4net.Appender.ConsoleAppender">
4+
5+
<!-- A1 uses PatternLayout -->
6+
<layout type="log4net.Layout.PatternLayout">
7+
<!-- Print the date in ISO 8601 format -->
8+
<conversionPattern value="%-5level %logger - %message%newline" />
9+
</layout>
10+
</appender>
11+
12+
<!-- Set root logger level to DEBUG and its only appender to A1 -->
13+
<root>
14+
<level value="Info" />
15+
<appender-ref ref="A1" />
16+
</root>
17+
18+
</log4net>

0 commit comments

Comments
 (0)