-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1720 from Microsoft/users/praga/vstestfixm100
Fixing support for testsettings file
- Loading branch information
Showing
6 changed files
with
133 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 36 | ||
"Patch": 37 | ||
}, | ||
"demands": [ | ||
"vstest" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 36 | ||
"Patch": 37 | ||
}, | ||
"demands": [ | ||
"vstest" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...t/RunSettingsForParallel.ReturnsSameFileIfParallelIsTrueAndFileNameIsTestSettingsFile.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[cmdletbinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\lib\Initialize-Test.ps1 | ||
Register-Mock Get-LocalizedString { $OFS = " " ; "$args" } | ||
Register-Mock Get-TaskVariable | ||
|
||
. $PSScriptRoot\..\..\..\Tasks\VsTest\Helpers.ps1 | ||
|
||
$cpuCount="1" | ||
$temptestsettingsfile = [io.path]::ChangeExtension([io.path]::GetTempFileName(),"testsettings") | ||
$testsettings = @('<?xml version="1.0" encoding="utf-8"?> | ||
<TestSettings name="Empty Test Settings"> | ||
<Description>Empty testsettings</Description> | ||
</TestSettings> | ||
') | ||
Set-Content -Value $testsettings -Path $temptestsettingsfile | ||
|
||
$returnedFilePath = SetupRunSettingsFileForParallel "true" $temptestsettingsfile $cpuCount | ||
|
||
$fileExists = Test-Path $returnedFilePath | ||
Assert-AreEqual $true $fileExists | ||
|
||
Assert-AreEqual $temptestsettingsfile $returnedFilePath | ||
|
||
#cleanup | ||
if($fileExists){ | ||
Remove-Item $returnedFilePath | ||
} | ||
if(Test-Path $temptestsettingsfile){ | ||
Remove-Item $temptestsettingsfile | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters