Skip to content

Commit

Permalink
Fixed test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpar committed Jul 5, 2021
1 parent 47c2816 commit 5b30d40
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions Scripts/Build.ps1
Expand Up @@ -233,27 +233,28 @@ function Test-Version() {

function Test-UnitTests() {
Write-Host "Running unit tests"
$resultsDir = Join-Path $binariesDir "xunitResults"
Create-Directory $resultsDir

$all =
"VimCoreTest\net472\Vim.Core.UnitTest.dll",
"VimWpfTest\net472\Vim.UI.Wpf.UnitTest.dll",
"VsVimSharedTest\net472\Vim.VisualStudio.Shared.UnitTest.dll"
"VsVimTestn\net472\VsVim.UnitTest.dll"
$xunit = Join-Path (Get-PackagesDir) "xunit.runner.console\2.4.1\tools\net472\xunit.console.x86.exe"
$anyFailed = $false

foreach ($filePath in $all) {
$filePath = Join-Path $configDir $filePath
$fileName = [IO.Path]::GetFileNameWithoutExtension($filePath)
$logFilePath = Join-Path $resultsDir "$($fileName).xml"
$arg = "$filePath -xml $logFilePath"
try {
Exec-Console $xunit $arg
}
catch {
$anyFailed = $true
foreach ($vsVersion in $vsVersions) {
Write-Host "Running $vsVersion"
$resultsDir = Join-Path $binariesDir "xunitResults"
Create-Directory $resultsDir

$all = @(
"VimCoreTest$($vsVersion)\net472\Vim.Core.$($vsVersion).UnitTest.dll",
"VsVimTest$($vsVersion)\net472\Vim.VisualStudio.Shared.$($vsVersion).UnitTest.dll")
$xunit = Join-Path (Get-PackagesDir) "xunit.runner.console\2.4.1\tools\net472\xunit.console.x86.exe"
$anyFailed = $false

foreach ($filePath in $all) {
$filePath = Join-Path $configDir $filePath
$fileName = [IO.Path]::GetFileNameWithoutExtension($filePath)
$logFilePath = Join-Path $resultsDir "$($fileName).xml"
$arg = "$filePath -xml $logFilePath"
try {
Exec-Console $xunit $arg
}
catch {
$anyFailed = $true
}
}
}

Expand Down

0 comments on commit 5b30d40

Please sign in to comment.