Title: Fix the terse output on Windows for unelevated test run by daxian-dbw · Pull Request #6252 · PowerShell/PowerShell · GitHub
Open Graph Title: Fix the terse output on Windows for unelevated test run by daxian-dbw · Pull Request #6252 · PowerShell/PowerShell
X Title: Fix the terse output on Windows for unelevated test run by daxian-dbw · Pull Request #6252 · PowerShell/PowerShell
Description: PR Summary After switching to Pester 4.3.1, the format of redirected output when running tests with runas.exe /trustlevel:0x20000 pwsh ... is changed, which causes Write-Terse to write out the elapsed time for each test case. As a result, the test-run log for AppVeyor builds is super long and rendering it in the browser takes a long time. See the screenshot below: Before switching to Pester 4.3.1 Executing script F:\tmp\temp\abc.tests.ps1 Describing abc [+] it 622ms Tests completed in 622ms Tests Passed: 1, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0 After switching to Pester 4.3.1. PS> runas.exe /trustlevel:0x20000 "f:\pscore\pwsh.exe -noprofile -c invoke-pester F:\tmp\temp *> f:\outputbuff" Executing script F:\tmp\temp\abc.tests.ps1 Describing abc [+] it 453ms Tests completed in 453ms Tests Passed: 1, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0 The fix is to skip the elapsed time for each test run. The RegEx pattern used to identify test-run time elapse is "^\d+(\.\d+)?m?s$". PS:131> $pattern = "^\d+(\.\d+)?m?s$" PS:132> "1ms" -match $pattern True PS:133> "12ms" -match $pattern True PS:134> "12s" -match $pattern True PS:135> "1s" -match $pattern True PS:137> "1.1s" -match $pattern True PS:138> "1.15s" -match $pattern True PS:139> "12.15s" -match $pattern True PR Checklist PR has a meaningful title Use the present tense and imperative mood when describing your changes Summarized changes Change is not breaking Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header This PR is ready to merge and is not Work in Progress. If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready. User-facing changes Not Applicable OR User-facing Documentation needed Issue filed - Issue link: Testing - New and feature Not Applicable or can only be tested interactively OR Make sure you've added a new test if existing tests do not effectively test the code changed Add [feature] if the change is significant or affects feature tests
Open Graph Description: PR Summary After switching to Pester 4.3.1, the format of redirected output when running tests with runas.exe /trustlevel:0x20000 pwsh ... is changed, which causes Write-Terse to write out the elap...
X Description: PR Summary After switching to Pester 4.3.1, the format of redirected output when running tests with runas.exe /trustlevel:0x20000 pwsh ... is changed, which causes Write-Terse to write out the elap...
Opengraph URL: https://github.com/PowerShell/PowerShell/pull/6252
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b8f8b123-8521-e076-c5fe-0a02e2fca8c4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CBA4:A72D1:554A3:74BF9:6A55317D |
| html-safe-nonce | 74258cb0c8d349a1b7e41e311ed503042f6b1432afc4193890c1e9716fc8e475 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkE0OkE3MkQxOjU1NEEzOjc0QkY5OjZBNTUzMTdEIiwidmlzaXRvcl9pZCI6IjcwNDMyMjI5NDM4NTQ1NzE5MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6af41e2b011c4fe963260fcecd84d9dfe513709644bd0c628de2962c556714a7 |
| hovercard-subject-tag | pull_request:171522202 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/pull/6252/files |
| twitter:image | https://avatars.githubusercontent.com/u/127450?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/127450?s=400&v=4 |
| og:image:alt | PR Summary After switching to Pester 4.3.1, the format of redirected output when running tests with runas.exe /trustlevel:0x20000 pwsh ... is changed, which causes Write-Terse to write out the elap... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fbd8fce4d63ac394c5405faa20aa50d5c9e56b979ac43ee1b26f8e7c47c4cd89 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf96660b44878f418b09d3d6ecde00ad62332910 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width