-
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.
VSBuildV1 - added ability to disable default logger (#14331)
* Added input to disable default logger * Updated common package * Bumped package version * Fixed default value - common package * Removed redundant space * Removed changes in common package * Bumped tasks version - depending on updated common * Bumped msbuild helpers package version * Specified parameter for Invoke-BuildTools mock * Command fix * Fixed tests * Added L0 tests for new input * Fixed tests for common package * Added tests to common package * Removed redundant changes in tests
- Loading branch information
Anatoly Bolshakov
authored
Feb 12, 2021
1 parent
ac62063
commit f920a64
Showing
24 changed files
with
132 additions
and
53 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
23 changes: 23 additions & 0 deletions
23
Tasks/Common/MSBuildHelpers/Tests/Invoke-BuildTools.DefaultLoggerEnabledByDefault.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,23 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
Microsoft.PowerShell.Core\Import-Module $PSScriptRoot\.. | ||
$directory = 'Some drive:\Some directory' | ||
$file = "$directory\Some solution" | ||
$msBuildLocation = 'Some MSBuild location' | ||
$msBuildArguments = 'Some MSBuild arguments' | ||
|
||
Register-Mock Invoke-NuGetRestore { 'NuGet output' } -- -File $file | ||
Register-Mock Invoke-MSBuild { 'MSBuild disabled logger output' } -- -ProjectFile $file -MSBuildPath $msBuildLocation -AdditionalArguments $msBuildArguments -NoTimelineLogger: $true -IsDefaultLoggerEnabled:$true -LogFile: "$file.log" | ||
|
||
# Act. | ||
$actual = Invoke-BuildTools -NuGetRestore -SolutionFiles $file -MSBuildLocation $msBuildLocation -MSBuildArguments $msBuildArguments -NoTimelineLogger -CreateLogFile | ||
# Assert. | ||
Assert-AreEqual -Expected @( | ||
'NuGet output' | ||
'MSBuild disabled logger output' | ||
) -Actual $actual | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
Tasks/Common/MSBuildHelpers/Tests/Invoke-BuildTools.DisableDefaultLogger.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,23 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
Microsoft.PowerShell.Core\Import-Module $PSScriptRoot\.. | ||
$directory = 'Some drive:\Some directory' | ||
$file = "$directory\Some solution" | ||
$msBuildLocation = 'Some MSBuild location' | ||
$msBuildArguments = 'Some MSBuild arguments' | ||
|
||
Register-Mock Invoke-NuGetRestore { 'NuGet output' } -- -File $file | ||
Register-Mock Invoke-MSBuild { 'MSBuild disabled logger output' } -- -ProjectFile $file -MSBuildPath $msBuildLocation -AdditionalArguments $msBuildArguments -NoTimelineLogger: $true -IsDefaultLoggerEnabled:$false -LogFile: "$file.log" | ||
|
||
# Act. | ||
$actual = Invoke-BuildTools -NuGetRestore -SolutionFiles $file -MSBuildLocation $msBuildLocation -MSBuildArguments $msBuildArguments -NoTimelineLogger -CreateLogFile -IsDefaultLoggerEnabled:$false | ||
# Assert. | ||
Assert-AreEqual -Expected @( | ||
'NuGet output' | ||
'MSBuild disabled logger output' | ||
) -Actual $actual | ||
|
||
|
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.