-
-
Notifications
You must be signed in to change notification settings - Fork 230
Misleading error message when device tests fail #4934
Copy link
Copy link
Closed
Labels
.NETPull requests that update .net codePull requests that update .net codeBugSomething isn't workingSomething isn't workingRepository Maintenance
Description
Description
When the device tests fail, we always get the error message:
device-test.ps1: The property 'FullName' cannot be found on this object. Verify that the property exists.
Error: Process completed with exit code 1.
This is because we have a finally block in the script that executes (and fails) even when the device tests have not run successfully:
sentry-dotnet/scripts/device-test.ps1
Lines 87 to 108 in 863ee6a
| Install-XHarness | |
| Remove-Item -Recurse -Force test_output -ErrorAction SilentlyContinue | |
| try | |
| { | |
| if ($VerbosePreference) | |
| { | |
| $arguments += '-v' | |
| } | |
| xharness $group test $arguments --output-directory=test_output | |
| if ($LASTEXITCODE -ne 0) | |
| { | |
| throw 'xharness run failed with non-zero exit code' | |
| } | |
| } | |
| finally | |
| { | |
| if ($CI) | |
| { | |
| scripts/parse-xunit2-xml.ps1 (Get-Item ./test_output/*.xml).FullName | Out-File $env:GITHUB_STEP_SUMMARY | |
| } | |
| } |
The script needs to be refactored to give a more useful error message when the tests fail.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETPull requests that update .net codePull requests that update .net codeBugSomething isn't workingSomething isn't workingRepository Maintenance
Fields
Give feedbackNo fields configured for issues without a type.