Skip to content

(maint) Reinstate test filtering #854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ function UploadTestLogs {
}
}

function XunitTraitFilter {
function DotNetTestFilter {
# Reference https://docs.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests
if ($TestFilter) { "-trait $TestFilter" } else { "" }
if ($TestFilter) { @("--filter",$TestFilter) } else { "" }
}

task Test TestServer,TestProtocol
Expand All @@ -359,23 +359,23 @@ task TestServer {
Set-Location .\test\PowerShellEditorServices.Test\

if (-not $script:IsUnix) {
exec { & $script:dotnetExe test -f $script:TestRuntime.Desktop }
exec { & $script:dotnetExe test -f $script:TestRuntime.Desktop (DotNetTestFilter) }
}

Invoke-WithCreateDefaultHook -NewModulePath $script:PSCoreModulePath {
exec { & $script:dotnetExe test -f $script:TestRuntime.Core }
exec { & $script:dotnetExe test -f $script:TestRuntime.Core (DotNetTestFilter) }
}
}

task TestProtocol {
Set-Location .\test\PowerShellEditorServices.Test.Protocol\

if (-not $script:IsUnix) {
exec { & $script:dotnetExe test -f $script:TestRuntime.Desktop }
exec { & $script:dotnetExe test -f $script:TestRuntime.Desktop (DotNetTestFilter) }
}

Invoke-WithCreateDefaultHook {
exec { & $script:dotnetExe test -f $script:TestRuntime.Core }
exec { & $script:dotnetExe test -f $script:TestRuntime.Core (DotNetTestFilter) }
}
}

Expand All @@ -384,11 +384,11 @@ task TestHost {

if (-not $script:IsUnix) {
exec { & $script:dotnetExe build -f $script:TestRuntime.Desktop }
exec { & $script:dotnetExe test -f $script:TestRuntime.Desktop }
exec { & $script:dotnetExe test -f $script:TestRuntime.Desktop (DotNetTestFilter) }
}

exec { & $script:dotnetExe build -c $Configuration -f $script:TestRuntime.Core }
exec { & $script:dotnetExe test -f $script:TestRuntime.Core }
exec { & $script:dotnetExe test -f $script:TestRuntime.Core (DotNetTestFilter) }
}

task CITest ?Test, {
Expand Down