added nunit console runner script

pull/3113/head
kay.one 11 years ago
parent 73ee1f89fe
commit cae0ebefc9

1
.gitignore vendored

@ -112,3 +112,4 @@ _output/
_rawPackage/
_dotTrace*
_tests/
*.Result.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
The .NET 2.0 build of nunit-agent only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
under .NET 4.0 and permits use of mixed mode
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!--
Nunit-agent is normally run by the console or gui
runners and not independently. In normal usage,
the runner specifies which runtime should be used.
Do NOT add any supportedRuntime elements here,
since they may prevent the runner from controlling
the runtime that is used!
-->
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

Binary file not shown.

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
<!--
The .NET 2.0 build of the console runner only
runs under .NET 2.0 or higher. The setting
useLegacyV2RuntimeActivationPolicy only applies
@ -8,24 +8,17 @@
assemblies, which would otherwise not load
correctly.
-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v4.0.30319" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1"/>
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true"/>
<!-- Look for addins in the addins directory for now -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib;addins"/>
</assemblyBinding>
</runtime>
</configuration>

@ -1,32 +0,0 @@
$msBuild = 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe'
$outputFolder = '.\_output'
Function Build()
{
$clean = $msbuild + " nzbdrone.sln /t:Clean /m"
$build = $msbuild + " nzbdrone.sln /p:Configuration=Release /p:Platform=x86 /t:Build"
if(Test-Path $outputFolder)
{
Remove-Item -Recurse -Force $outputFolder -ErrorAction Continue
}
Invoke-Expression $clean
Invoke-Expression $build
}
Function Package()
{
Write-Host Removing XMLDoc files
get-childitem $outputFolder -include *.xml -recurse | foreach ($_) {remove-item $_.fullname}
Write-Host Removing FluentValidation.resources
get-childitem $outputFolder -include FluentValidation.resources.dll -recurse | foreach ($_) {remove-item $_.fullname}
}
Build
Package

@ -0,0 +1,5 @@
NUNIT="./Libraries/nunit/nunit-console-x86.exe"
EXCLUDE="/exclude:Windows"
TESTDIR="."
mono $NUNIT $EXCLUDE /xml:NzbDrone.Libraries.Result.xml $TESTDIR/NzbDrone.Libraries.Test.dll
mono $NUNIT $EXCLUDE /xml:NzbDrone.Libraries.Common.Result.xm $TESTDIR/NzbDrone.Common.Test.dll
Loading…
Cancel
Save