Skip to content

Commit

Permalink
Add Appveyor CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Sep 17, 2016
1 parent 17d605f commit a6335c1
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 12 deletions.
12 changes: 12 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 0.4.{build}
image: Visual Studio 2015

build_script:
- ps: .\build.ps1 -Target "Appveyor"

# disable built-in tests.
test: off

artifacts:
- path: package\*.nupkg
- path: package\*.zip
4 changes: 2 additions & 2 deletions src/test-nunit-summary.exe/BriefHtmlOutputTests_NUnit2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class BriefHtmlOutputTests_NUnit2 : ReportCreationTests
{
protected override string Input
{
get { return "MockAssemblyTestResult-2.6.4.xml"; }
get { return "TestInput/MockAssemblyTestResult-2.6.4.xml"; }
}

protected override string Output
Expand All @@ -51,7 +51,7 @@ protected override string Options
new TestCaseData("Time: 11:13:55"),
new TestCaseData("Runtime Environment -"),
new TestCaseData("OS Version: Microsoft Windows NT 6.2.9200.0"),
new TestCaseData("CLR Version: " + Environment.Version),
new TestCaseData("CLR Version: 2.0.50727.8689"),
new TestCaseData("Tests run: 21, Errors: 1, Failures: 1, Inconclusive: 1, Time: 0.088 seconds"),
new TestCaseData("Not run: 7, Invalid: 3, Ignored: 4, Skipped: 0")
};
Expand Down
2 changes: 1 addition & 1 deletion src/test-nunit-summary.exe/BriefHtmlOutputTests_NUnit3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class BriefHtmlOutputTests_NUnit3 : ReportCreationTests
{
protected override string Input
{
get { return "MockAssemblyTestResult-3.5.0.xml"; }
get { return "TestInput/MockAssemblyTestResult-3.5.0.xml"; }
}

protected override string Output
Expand Down
4 changes: 2 additions & 2 deletions src/test-nunit-summary.exe/BriefTextOutputTests_NUnit2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BriefTextOutputTests_NUnit2 : ReportCreationTests
{
protected override string Input
{
get { return "MockAssemblyTestResult-2.6.4.xml"; }
get { return "TestInput/MockAssemblyTestResult-2.6.4.xml"; }
}

protected override string Output
Expand All @@ -47,7 +47,7 @@ protected override string Options
new TestCaseData("NUnit Version 2.6.4.14350 2016-09-10 11:13:55"),
new TestCaseData("Runtime Environment -"),
new TestCaseData(" OS Version: Microsoft Windows NT 6.2.9200.0"),
new TestCaseData(" CLR Version: " + Environment.Version),
new TestCaseData(" CLR Version: 2.0.50727.8689"),
new TestCaseData("Tests run: 21, Errors: 1, Failures: 1, Inconclusive: 1, Time: 0.088 seconds"),
new TestCaseData(" Not run: 7, Invalid: 3, Ignored: 4, Skipped: 0")
};
Expand Down
4 changes: 2 additions & 2 deletions src/test-nunit-summary.exe/DefaultHtmlOutputTests_NUnit2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DefaultHtmlOutputTests_NUnit2 : ReportCreationTests
{
protected override string Input
{
get { return "MockAssemblyTestResult-2.6.4.xml"; }
get { return "TestInput/MockAssemblyTestResult-2.6.4.xml"; }
}

protected override string Output
Expand All @@ -49,7 +49,7 @@ protected override string Options
new TestCaseData("Time: 11:13:55"),
new TestCaseData("Runtime Environment -"),
new TestCaseData("OS Version: Microsoft Windows NT 6.2.9200.0"),
new TestCaseData("CLR Version: " + Environment.Version),
new TestCaseData("CLR Version: 2.0.50727.8689"),
new TestCaseData("Tests run: 21, Errors: 1, Failures: 1, Inconclusive: 1, Time: 0.088 seconds"),
new TestCaseData("Not run: 7, Invalid: 3, Ignored: 4, Skipped: 0"),
new TestCaseData("Failures:"),
Expand Down
4 changes: 2 additions & 2 deletions src/test-nunit-summary.exe/DefaultTextOutputTests_NUnit2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DefaultTextOutputTests_NUnit2 : ReportCreationTests
{
protected override string Input
{
get { return "MockAssemblyTestResult-2.6.4.xml"; }
get { return "TestInput/MockAssemblyTestResult-2.6.4.xml"; }
}

protected override string Output
Expand All @@ -47,7 +47,7 @@ protected override string Options
new TestCaseData("NUnit Version 2.6.4.14350 2016-09-10 11:13:55"),
new TestCaseData("Runtime Environment -"),
new TestCaseData(" OS Version: Microsoft Windows NT 6.2.9200.0"),
new TestCaseData(" CLR Version: " + Environment.Version),
new TestCaseData(" CLR Version: 2.0.50727.8689"),
new TestCaseData("Tests run: 21, Errors: 1, Failures: 1, Inconclusive: 1, Time: 0.088 seconds"),
new TestCaseData(" Not run: 7, Invalid: 3, Ignored: 4, Skipped: 0"),
new TestCaseData("Failures:"),
Expand Down
5 changes: 2 additions & 3 deletions src/test-nunit-summary.exe/ReportCreationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ namespace NUnit.Extras.Tests
{
public abstract class ReportCreationTests
{
protected const string INPUT_DIR = "../../input";
protected const string REPORT_DIR = "../../reports";
protected static readonly string REPORT_DIR = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestReports");

protected abstract string Input { get; }
protected abstract string Output { get; }
Expand All @@ -44,7 +43,7 @@ public void CreateOutputReport()

var input = Input;
if (!Path.IsPathRooted(input))
input = Path.Combine(INPUT_DIR, input);
input = Path.Combine(TestContext.CurrentContext.TestDirectory, input);

_output = Output;
if (!Path.IsPathRooted(_output))
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions src/test-nunit-summary.exe/test-nunit-summary.exe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="TestInput\MockAssemblyTestResult-2.6.4.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestInput\MockAssemblyTestResult-3.5.0.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down

0 comments on commit a6335c1

Please sign in to comment.