Skip to content

Commit

Permalink
integration test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 6, 2023
1 parent 4671bf2 commit 7b4195f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
15 changes: 5 additions & 10 deletions test/cli-integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ Describe 'Console apps (<framework>) - native AOT publish' -ForEach @(

Describe 'MAUI' {
BeforeAll {
CreateSentryPackage 'Sentry.Android.AssemblyReader'
CreateSentryPackage 'Sentry.Bindings.Android'
CreateSentryPackage 'Sentry.Extensions.Logging'
CreateSentryPackage 'Sentry.Maui'
RegisterLocalPackage 'Sentry.Android.AssemblyReader'
RegisterLocalPackage 'Sentry.Bindings.Android'
RegisterLocalPackage 'Sentry.Extensions.Logging'
RegisterLocalPackage 'Sentry.Maui'
DotnetNew 'maui' './temp/maui-app' 'net7.0'
}

It "uploads symbols and sources for an Android build" {
$result = RunDotnet 'build' './temp/maui-app' $True $True 'net7.0-android'
$result.UploadedDebugFiles() | Sort-Object -Unique | Should -Be @('maui-app.pdb')
$result.ScriptOutput | Should -AnyElementMatch 'Found 6 debug information files \(6 with embedded sources\)'
$result.ScriptOutput | Should -AnyElementMatch 'Found 1 debug information file \(1 with embedded sources\)'
}

It "uploads symbols and sources for an iOS build" -Skip:(!$IsMacOS) {
Expand All @@ -136,11 +136,6 @@ Describe 'MAUI' {
'libSystem.Security.Cryptography.Native.Apple.dylib',
'libxamarin-dotnet-debug.dylib',
'libxamarin-dotnet.dylib',
'Sentry',
'Sentry.Bindings.Cocoa.pdb',
'Sentry.Extensions.Logging.pdb',
'Sentry.Maui.pdb',
'Sentry.pdb',
'maui-app',
'maui-app.pdb'
)
Expand Down
13 changes: 7 additions & 6 deletions test/integration-test-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BeforeAll {
(Select-Xml -Path "$PSScriptRoot/../Directory.Build.props" -XPath "/Project/PropertyGroup/Version").Node.InnerText
}

function CreateSentryPackage([string] $name)
function RegisterLocalPackage([string] $name)
{
$packageVersion = GetSentryPackageVersion
$packagePath = "src/$name/bin/Release/$name.$packageVersion.nupkg"
Expand All @@ -85,7 +85,7 @@ BeforeAll {
}

Remove-Item -Path ./temp/packages -Recurse -Force -ErrorAction SilentlyContinue
CreateSentryPackage 'Sentry'
RegisterLocalPackage 'Sentry'

function RunDotnet([string] $action, [string]$project, [bool]$Symbols, [bool]$Sources, [string]$TargetFramework = 'net7.0')
{
Expand Down Expand Up @@ -181,16 +181,17 @@ BeforeAll {
if ($type -eq 'maui')
{
AddPackageReference $path 'Sentry.Maui'
} else {
AddPackageReference $path 'Sentry'
}

@"
else
{
AddPackageReference $path 'Sentry'
@"
<Project>
<PropertyGroup>
<PublishAot>true</PublishAot>
</PropertyGroup>
</Project>
"@ | Out-File $path/Directory.build.props
}
}
}

0 comments on commit 7b4195f

Please sign in to comment.