forked from NLog/NLog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.ps1
76 lines (64 loc) · 2.89 KB
/
run-tests.ps1
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
74
75
76
dotnet restore ./tests/NLog.UnitTests/
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.UnitTests/ --framework netcoreapp2.1 --configuration release --no-restore
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
if ($isWindows -or $Env:WinDir)
{
dotnet test ./tests/NLog.UnitTests/ --framework net461 --configuration release --no-restore
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.Database.Tests/ --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.MSMQ.Tests/ --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.PerformanceCounter.Tests/ --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.Wcf.Tests/ --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.WindowsIdentity.Tests/ --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.WindowsRegistry.Tests/ --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet msbuild /t:Build /p:targetFramework=net461 /p:Configuration=Release /p:DebugType=Full /p:TestTargetFramework=net35 ./tests/NLog.UnitTests/
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet vstest ./tests/NLog.UnitTests/bin/Release/net35/NLog.UnitTests.dll
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet msbuild /t:Build /p:targetFramework=net461 /p:Configuration=Release /p:DebugType=Full /p:TestTargetFramework=net45 ./tests/NLog.UnitTests/
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet vstest ./tests/NLog.UnitTests/bin/Release/net45/NLog.UnitTests.dll
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
}
else
{
# Need help from MONO to run normal .NetFramework tests
dotnet msbuild /t:Restore,Rebuild /p:targetframework=net461 /p:Configuration=Release /p:DebugType=Full /p:monobuild=1 tests/NLog.UnitTests
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet vstest ./tests/NLog.UnitTests/bin/Release/net461/NLog.UnitTests.dll
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet msbuild /t:Build /p:targetFramework=net45 /p:Configuration=Release /p:DebugType=Full /p:monobuild=1 ./src/NLog/
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet msbuild /t:Build /p:targetFramework=net461 /p:Configuration=Release /p:DebugType=Full /p:monobuild=1 /p:TestTargetFramework=net45 tests/NLog.UnitTests
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet vstest ./tests/NLog.UnitTests/bin/Release/net45/NLog.UnitTests.dll
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
dotnet test ./tests/NLog.Database.Tests/ --framework netcoreapp2.1 --configuration release
if (-Not $LastExitCode -eq 0)
{ exit $LastExitCode }
}