-
Notifications
You must be signed in to change notification settings - Fork 60
/
TestDotNetFramework.ps1
54 lines (41 loc) · 2.94 KB
/
TestDotNetFramework.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
Write-Host "-------------------------------------------------------------"
Write-Host "- Starting test for .Net Framework DLLs -"
Write-Host "-------------------------------------------------------------"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\"
$exitcode=0
mkdir d:\a\1\s\TestResults\DotNetFramework
./vstest.console.exe "d:\a\1\s\Ginger\GingerCoreTest\bin\Release\net8.0-windows10.0.17763.0\GingerCoreTest.dll" /Logger:trx /ResultsDirectory:d:\a\1\s\TestResults\DotNetFramework
Write-Host ">>>>>>>>>>>>>>>>>>>>>>>>>>>>> LastExitCode: " $LastExitCode
if ($LastExitCode -ne 0)
{
$exitcode = 1
}
./vstest.console.exe "d:\a\1\s\Ginger\GingerTest\bin\Release\net8.0-windows10.0.17763.0\GingerTest.dll" /Logger:trx /ResultsDirectory:d:\a\1\s\TestResults\DotNetFramework
Write-Host ">>>>>>>>>>>>>>>>>>>>>>>>>>>>> LastExitCode: " $LastExitCode
if ($LastExitCode -ne 0)
{
$exitcode = 1
}
Write-Host "-------------------------------------------------------------"
Write-Host "- Tests Completed -"
Write-Host "-------------------------------------------------------------"
cd d:\a\1\s\TestResults
dir
Write-Host "-------------------------------------------------------------"
Write-Host "- Copy Test Artifacts -"
Write-Host "-------------------------------------------------------------"
New-Item -Path "d:\a\1\a" -Name "TestCompleted.txt" -ItemType "file" -Value "Test Completed Artifacts"
Compress-Archive -Path 'd:\a\1\s\Ginger\GingerUtilsTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerUtilsTestArtifacts'
Compress-Archive -Path 'd:\a\1\s\Ginger\GingerCoreCommonTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerCoreCommonTestArtifacts'
Compress-Archive -Path 'd:\a\1\s\Ginger\GingerCoreNETUnitTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerCoreNETUnitTestArtifacts'
Compress-Archive -Path 'd:\a\1\s\Ginger\GingerConsoleTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerConsoleTestArtifacts'
Compress-Archive -Path 'd:\a\1\s\Ginger\GingerAutoPilotTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerAutoPilotTestArtifacts'
8# Compress-Archive -Path 'd:\a\1\s\Ginger\GingerPluginCoreTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerPluginCoreTestArtifacts'
# Compress-Archive -Path 'd:\a\1\s\Ginger\GingerCoreTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerCoreTestTestArtifacts'
# Compress-Archive -Path 'd:\a\1\s\Ginger\GingerTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerTestArtifacts'
Write-Host "-------------------------------------------------------------"
Write-Host "- Artifacts List -"
Write-Host "-------------------------------------------------------------"
cd d:\a\1\a\
dir
exit $exitcode