Correct spelling in Comments and tests (#17480)

This commit is contained in:
Shuangchi He 2022-06-07 00:55:33 +08:00 committed by GitHub
parent c798f74056
commit c5d31c9e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 13 deletions

View File

@ -1561,7 +1561,7 @@ function Publish-TestResults
# If we attempt to upload a result file which has no test cases in it, then vsts will produce a warning
# so check to be sure we actually have a result file that contains test cases to upload.
# If the the "test-case" count is greater than 0, then we have results.
# If the "test-case" count is greater than 0, then we have results.
# Regardless, we want to upload this as an artifact, so this logic doesn't pertain to that.
if ( @(([xml](Get-Content $Path)).SelectNodes(".//test-case")).Count -gt 0 -or $Type -eq 'XUnit' ) {
Write-Host "##vso[results.publish type=$Type;mergeResults=true;runTitle=$Title;publishRunAttachments=true;resultFiles=$tempFilePath;failTaskOnFailedTests=true]"

View File

@ -877,7 +877,7 @@ switch ($x)
@{ inputStr = '[math].G'; expected = 'GenericParameterAttributes'; setup = $null }
@{ inputStr = '[Environment+specialfolder]::App'; expected = 'ApplicationData'; setup = $null }
@{ inputStr = 'icm {get-pro'; expected = 'Get-Process'; setup = $null }
@{ inputStr = 'write-ouput (get-pro'; expected = 'Get-Process'; setup = $null }
@{ inputStr = 'write-output (get-pro'; expected = 'Get-Process'; setup = $null }
@{ inputStr = 'iex "get-pro'; expected = '"Get-Process"'; setup = $null }
@{ inputStr = '$variab'; expected = '$variableA'; setup = { $variableB = 2; $variableA = 1 } }
@{ inputStr = 'a -'; expected = '-keys'; setup = { function a {param($keys) $a} } }

View File

@ -47,7 +47,7 @@ Describe "Experimental Feature: && and || operators - Feature-Enabled" -Tag CI {
@{ Statement = 'testexe -returncode -1 || testexe -returncode -2 && testexe -echoargs "A"'; Output = @('-1', '-2') }
@{ Statement = 'testexe -returncode -1 || testexe -returncode -2 || testexe -echoargs "B"'; Output = @('-1', '-2', 'Arg 0 is <B>') }
# Native command and succesful cmdlet
# Native command and successful cmdlet
@{ Statement = 'Test-SuccessfulCommand && testexe -returncode 0'; Output = @('SUCCESS', '0') }
@{ Statement = 'testexe -returncode 0 && Test-SuccessfulCommand'; Output = @('0', 'SUCCESS') }
@{ Statement = 'Test-SuccessfulCommand && testexe -returncode 1'; Output = @('SUCCESS', '1') }

View File

@ -143,7 +143,7 @@ Describe "ParserTests (admin\monad\tests\monad\src\engine\core\ParserTests.cs)"
{ ExecuteCommand "(" } | Should -Throw -ErrorId "IncompleteParseException"
}
It "Throws an exception if the the first statement starts with an empty pipe element (line 188)" {
It "Throws an exception if the first statement starts with an empty pipe element (line 188)" {
{ ExecuteCommand "| Get-Location" } | Should -Throw -ErrorId "ParseException"
}

View File

@ -813,7 +813,7 @@ Describe "Copy-Item remotely bug fixes" -Tags "Feature" {
# Copy file to session
Copy-Item -Path "TestDrive:\Source\testFile1.txt" -Destination "$TestDrive\Destination\testFile1.txt" -ToSession $s
# Validate the the file was overwritten
# Validate the file was overwritten
$fileContent = Get-Content "TestDrive:\Destination\testFile1.txt" -ErrorAction SilentlyContinue -Raw
$fileContent | Should -Match $newContent
}
@ -823,7 +823,7 @@ Describe "Copy-Item remotely bug fixes" -Tags "Feature" {
# Copy file to session
Copy-Item -Path "$TestDrive\Source\testFile1.txt" -Destination "TestDrive:\Destination\testFile1.txt" -FromSession $s
# Validate the the file was overwritten
# Validate the file was overwritten
$fileContent = Get-Content "TestDrive:\Destination\testFile1.txt" -ErrorAction SilentlyContinue -Raw
$fileContent | Should -Match $newContent
}

View File

@ -6,7 +6,7 @@ Describe "Wait-Event" -Tags "CI" {
It "Should time out when it does not receive a FakeEvent" {
# Don't depend on Measure-Command
$stopwatch = [System.Diagnostics.Stopwatch]::startNew()
# Testing the the timeout, so wait for an event that will never be
# Testing the timeout, so wait for an event that will never be
# raised because it is fake
Wait-Event -Timeout 1 -SourceIdentifier "FakeEvent"
$stopwatch.Stop()

View File

@ -38,7 +38,7 @@ log show ./system.logarchive/ --info --predicate 'process == "pwsh"' >pwsh.log.t
Parsing Notes:
* Sample contains 6.0.1 content (which is out of date) revise with 6.1.0 preview
* Ensure analytic data is considered when parsing; specifically Provider_Lifecycle:ProviderStart.Method.Informational
* Multi-line output is expected. Parsing needs to detect the timestamp at the begining
* Multi-line output is expected. Parsing needs to detect the timestamp at the beginning
of a line and append subsequent lines to the message until the next 'log' line is found.
* Header lines need to be skipped.
@ -564,7 +564,7 @@ function ConvertFrom-SysLog
PS> $time = [DateTime]::Parse('1/19/2018 1:26:49 PM')
PS> Get-PSSysLog -id 'powershell' -logPath '/var/log/syslog' -After $time
Gets log entries with the id 'powershell' that occured on or after a specific date/time
Gets log entries with the id 'powershell' that occurred on or after a specific date/time
.NOTES
This function reads syslog entries using Get-Content, filters based on the id, and
@ -908,7 +908,7 @@ function Export-PSOsLog
Write-Output $log
}
else {
throw "did not recieve at least $MinimumCount records but $($logToCount.Count) instead."
throw "did not receive at least $MinimumCount records but $($logToCount.Count) instead."
}
} -TimeoutInMilliseconds $TimeoutInMilliseconds -IntervalInMilliseconds $IntervalInMilliseconds -LogErrorSb {
$log = Start-NativeExecution -command {log show --info @extraParams}

View File

@ -231,7 +231,7 @@ function Get-DotnetUpdate {
$Message = $null -eq $currentVersion.PreReleaseLabel ? "$latestSDKversion is not preview, update manually." : "No update needed."
}
} catch {
Write-Verbose -Verbose "Error occured: $_.message"
Write-Verbose -Verbose "Error occurred: $_.message"
$shouldUpdate = $false
$newVersion = $null
Write-Error "Error while checking .NET SDK update: $($_.message)"

View File

@ -3,8 +3,8 @@
<!-- Created by Alois Kraus. Free for public use.
The JIT time is determined by the MethodJitStart event and the directly on this thread following MethodLoadUnload event which signals when the JIT compilation for this
method is complete.
Unfortunately the Region sums as it is currently in WPA it will sum not the JIT times of all threads but if e.g. 2 threads JIT for one second each then the WPA sum accross all threads will be only 1s.
WPA seems to sum on a timeline only the active time accross all threads and uses this as sum which is not a good measure to compare results. This should be changed although this logic might
Unfortunately the Region sums as it is currently in WPA it will sum not the JIT times of all threads but if e.g. 2 threads JIT for one second each then the WPA sum across all threads will be only 1s.
WPA seems to sum on a timeline only the active time across all threads and uses this as sum which is not a good measure to compare results. This should be changed although this logic might
be well suited for regions where each region signals a bottleneck on which others have to wait e.g. during boot.
-->
<InstrumentationManifest>