-
Notifications
You must be signed in to change notification settings - Fork 62
/
TestDotNetFrameworkGithub.ps1
55 lines (42 loc) · 3.07 KB
/
TestDotNetFrameworkGithub.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
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\Ginger\Ginger\TestResults\DotNetFramework
mkdir D:\a\1\a
./vstest.console.exe "D:\a\Ginger\Ginger\Ginger\GingerCoreTest\bin\Release\net8.0-windows10.0.17763.0\GingerCoreTest.dll" /Logger:trx /ResultsDirectory:D:\a\Ginger\Ginger\TestResults\DotNetFramework
Write-Host ">>>>>>>>>>>>>>>>>>>>>>>>>>>>> LastExitCode: " $LastExitCode
if ($LastExitCode -ne 0)
{
$exitcode = 1
}
./vstest.console.exe "D:\a\Ginger\Ginger\Ginger\GingerTest\bin\Release\net8.0-windows10.0.17763.0\GingerTest.dll" /Logger:trx /ResultsDirectory:D:\a\Ginger\Ginger\TestResults\DotNetFramework
Write-Host ">>>>>>>>>>>>>>>>>>>>>>>>>>>>> LastExitCode: " $LastExitCode
if ($LastExitCode -ne 0)
{
$exitcode = 1
}
Write-Host "-------------------------------------------------------------"
Write-Host "- Tests Completed -"
Write-Host "-------------------------------------------------------------"
cd D:\a\Ginger\Ginger\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\Ginger\Ginger\Ginger\GingerUtilsTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerUtilsTestArtifacts'
Compress-Archive -Path 'D:\a\Ginger\Ginger\Ginger\GingerCoreCommonTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerCoreCommonTestArtifacts'
Compress-Archive -Path 'D:\a\Ginger\Ginger\Ginger\GingerCoreNETUnitTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerCoreNETUnitTestArtifacts'
Compress-Archive -Path 'D:\a\Ginger\Ginger\Ginger\GingerConsoleTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerConsoleTestArtifacts'
Compress-Archive -Path 'D:\a\Ginger\Ginger\Ginger\GingerAutoPilotTest\bin\Release\net8.0\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerAutoPilotTestArtifacts'
# Compress-Archive -Path 'd:\a\1\s\Ginger\GingerPluginCoreTest\bin\Release\netcoreapp3.1\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerPluginCoreTestArtifacts'
# Compress-Archive -Path 'd:\a\1\s\Ginger\GingerCoreTest\bin\Release\netcoreapp3.1\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerCoreTestTestArtifacts'
# Compress-Archive -Path 'd:\a\1\s\Ginger\GingerTest\bin\Release\netcoreapp3.1\TestArtifacts' -DestinationPath 'D:\a\1\a\GingerArtifacts'
Write-Host "-------------------------------------------------------------"
Write-Host "- Artifacts List -"
Write-Host "-------------------------------------------------------------"
cd D:\a\1\a\
dir
exit $exitcode