-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check file-writer construction when writing envelope to path (#1036
) * fix: check file-writer construction when writing envelope to path * update changelog. * clang-format * add a powershell convenience test-runner * clarify platform support for `sentry_handle_exception()`
- Loading branch information
1 parent
a762b23
commit 58c3286
Showing
8 changed files
with
85 additions
and
3 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
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,40 @@ | ||
param ( | ||
[switch]$Unit = $false, | ||
[switch]$Clean = $false, | ||
[string]$Keyword = "", | ||
[int]$Parallelism = 1, | ||
[switch]$WithoutCrashpadWer = $false | ||
) | ||
|
||
$update_test_discovery = Join-Path -Path $PSScriptRoot -ChildPath "update_test_discovery.ps1" | ||
& $update_test_discovery | ||
|
||
if ($Clean -or -not (Test-Path .\.venv)) | ||
{ | ||
Remove-Item -Recurse -Force .\.venv\ -ErrorAction SilentlyContinue | ||
python3.exe -m venv .venv | ||
.\.venv\Scripts\pip.exe install --upgrade --requirement .\tests\requirements.txt | ||
} | ||
|
||
$pytestCommand = ".\.venv\Scripts\pytest.exe .\tests\ --verbose" | ||
|
||
if ($Parallelism -gt 1) | ||
{ | ||
$pytestCommand += " -n $Parallelism" | ||
} | ||
|
||
if (-not $WithoutCrashpadWer -and -not $Unit) | ||
{ | ||
$pytestCommand += " --with_crashpad_wer" | ||
} | ||
|
||
if ($Keyword) | ||
{ | ||
$pytestCommand += " -k `"$Keyword`"" | ||
} | ||
elseif ($Unit) | ||
{ | ||
$pytestCommand += " -k `"unit`"" | ||
} | ||
|
||
Invoke-Expression $pytestCommand |
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,7 @@ | ||
Get-ChildItem -Path 'tests/unit/*.c' | ForEach-Object { | ||
Get-Content $_.FullName | ForEach-Object { | ||
if ($_ -match 'SENTRY_TEST\(([^)]+)\)') { | ||
$_ -replace 'SENTRY_TEST\(([^)]+)\)', 'XX($1)' | ||
} | ||
} | ||
} | Sort-Object | Where-Object { $_ -notmatch 'define' } | Get-Unique | Set-Content 'tests/unit/tests.inc' |
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