@@ -1369,13 +1369,6 @@ function Start-PSxUnit {
13691369 throw " PowerShell must be built before running tests!"
13701370 }
13711371
1372- if (Test-Path $SequentialTestResultsFile ) {
1373- Remove-Item $SequentialTestResultsFile - Force - ErrorAction SilentlyContinue
1374- }
1375- if (Test-Path $ParallelTestResultsFile ) {
1376- Remove-Item $ParallelTestResultsFile - Force - ErrorAction SilentlyContinue
1377- }
1378-
13791372 try {
13801373 Push-Location $PSScriptRoot / test/ csharp
13811374
@@ -1413,8 +1406,10 @@ function Start-PSxUnit {
14131406 }
14141407
14151408 # Run sequential tests first, and then run the tests that can execute in parallel
1416- dotnet xunit - configuration $Options.configuration - xml $SequentialTestResultsFile - namespace " PSTests.Sequential" - parallel none
1417-
1409+ if (Test-Path $SequentialTestResultsFile ) {
1410+ Remove-Item $SequentialTestResultsFile - Force - ErrorAction SilentlyContinue
1411+ }
1412+ dotnet test -- configuration $Options.configuration -- filter FullyQualifiedName~PSTests.Sequential - p:ParallelizeTestCollections= false -- test-adapter - path:. " --logger:xunit;LogFilePath=$SequentialTestResultsFile "
14181413 Publish-TestResults - Path $SequentialTestResultsFile - Type ' XUnit' - Title ' Xunit Sequential'
14191414
14201415 $extraParams = @ ()
@@ -1430,7 +1425,10 @@ function Start-PSxUnit {
14301425 )
14311426 }
14321427
1433- dotnet xunit - configuration $Options.configuration - xml $ParallelTestResultsFile - namespace " PSTests.Parallel" - nobuild @extraParams
1428+ if (Test-Path $ParallelTestResultsFile ) {
1429+ Remove-Item $ParallelTestResultsFile - Force - ErrorAction SilentlyContinue
1430+ }
1431+ dotnet test -- configuration $Options.configuration -- filter FullyQualifiedName~PSTests.Parallel -- no- build -- test-adapter - path:. " --logger:xunit;LogFilePath=$ParallelTestResultsFile "
14341432 Publish-TestResults - Path $ParallelTestResultsFile - Type ' XUnit' - Title ' Xunit Parallel'
14351433 }
14361434 finally {
0 commit comments