1- $include = " *-tests. dll" , " *-tests .NUnit.dll"
2- $includePerfTests = " *-tests.performance .dll"
3- $exclude = " Experimental\\.*?\\CodeJam- Tests.Performance.dll"
1+ $include = " *.Tests. dll" , " *.Tests .NUnit.dll"
2+ $includePerfTests = " *.Tests.Performance .dll"
3+ $exclude = " Experimental\\.*?\\CodeJam. Tests.Performance.dll"
44
55$wc = New-Object System.Net.WebClient
66
77# run .net tests
88$logFileName = " $env: APPVEYOR_BUILD_FOLDER \_Results\net_nunit_results.xml"
99$a = (gci - include $include - r | `
10- where { $_.fullname -match " \\bin\\Publish \\net\d" -and $_.fullname -notmatch $exclude } | `
10+ where { $_.fullname -match " \\bin\\Release \\net\d" -and $_.fullname -notmatch $exclude } | `
1111 select - ExpandProperty FullName)
1212echo " nunit3-console $a --result=$logFileName "
1313& " nunit3-console" $a " --result=$logFileName "
@@ -20,23 +20,23 @@ if ($LastExitCode -ne 0) {
2020}
2121
2222# run .net perftests
23- $logFileName = " $env: APPVEYOR_BUILD_FOLDER \_Results\net_perftest_nunit_results.xml"
24- $a = (gci - include $includePerfTests - r | `
25- where { $_.fullname -match " \\bin\\Publish \\net\d" -and $_.fullname -notmatch $exclude } | `
26- select - ExpandProperty FullName)
27- echo " nunit3-console $a --result=$logFileName " -- agents= 1
28- & " nunit3-console" $a " --result=$logFileName " -- agents= 1
29- if ($LastExitCode -ne 0 ) { $host.SetShouldExit ($LastExitCode ) }
30- echo " UploadFile: https://ci.appveyor.com/api/testresults/nunit3/$env: APPVEYOR_JOB_ID from $logFileName "
31- $wc.UploadFile (" https://ci.appveyor.com/api/testresults/nunit3/$env: APPVEYOR_JOB_ID " , " $logFileName " )
32- if ($LastExitCode -ne 0 ) {
33- echo " FAIL: UploadFile: https://ci.appveyor.com/api/testresults/nunit3/$env: APPVEYOR_JOB_ID from $logFileName "
34- $host.SetShouldExit ($LastExitCode )
35- }
23+ # $logFileName = "$env:APPVEYOR_BUILD_FOLDER\_Results\net_perftest_nunit_results.xml"
24+ # $a = (gci -include $includePerfTests -r | `
25+ # where { $_.fullname -match "\\bin\\Release \\net\d" -and $_.fullname -notmatch $exclude } | `
26+ # select -ExpandProperty FullName)
27+ # echo "nunit3-console $a --result=$logFileName" --agents=1
28+ # &"nunit3-console" $a "--result=$logFileName" --agents=1
29+ # if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
30+ # echo "UploadFile: https://ci.appveyor.com/api/testresults/nunit3/$env:APPVEYOR_JOB_ID from $logFileName"
31+ # $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$env:APPVEYOR_JOB_ID", "$logFileName")
32+ # if ($LastExitCode -ne 0) {
33+ # echo "FAIL: UploadFile: https://ci.appveyor.com/api/testresults/nunit3/$env:APPVEYOR_JOB_ID from $logFileName"
34+ # $host.SetShouldExit($LastExitCode)
35+ # }
3636
3737# run .net core tests
3838$a = (gci - include $include - r | `
39- where { $_.fullname -match " \\bin\\Publish \\netcore" -and $_.fullname -notmatch $exclude } | `
39+ where { $_.fullname -match " \\bin\\Release \\netcore" -and $_.fullname -notmatch $exclude } | `
4040 select - ExpandProperty FullName)
4141
4242$logFileName = " $env: APPVEYOR_BUILD_FOLDER \_Results\netcore_nunit_results.xml"
0 commit comments