Skip to content
Prev Previous commit
Next Next commit
test: update integration tests
Note: [System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier
is available on .NET 5+ but these Native AOT integration tests are only
relevant for .NET 7+ when Native AOT was introduced.
  • Loading branch information
jpnurmi committed Jul 23, 2025
commit 90eaffd30f6b52b191f17592a2d6b0dcb7c31b46
34 changes: 3 additions & 31 deletions integration-test/runtime.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,37 +42,9 @@ internal class FakeTransport : ITransport

function getConsoleAppPath()
{
if ($IsMacOS)
{
$arch = $(uname -m) -eq 'arm64' ? 'arm64' : 'x64'
return "./console-app/bin/Release/$framework/osx-$arch/publish/console-app"
}
elseif ($IsWindows)
{
if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
{
return "./console-app/bin/Release/$framework/win-arm64/publish/console-app.exe"
}
else
{
return "./console-app/bin/Release/$framework/win-x64/publish/console-app.exe"
}
}
else
{
if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
{
return "./console-app/bin/Release/$framework/linux-arm64/publish/console-app"
}
elseif ((ldd --version 2>&1) -match 'musl')
{
return "./console-app/bin/Release/$framework/linux-musl-x64/publish/console-app"
}
else
{
return "./console-app/bin/Release/$framework/linux-x64/publish/console-app"
}
}
$rid = [System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier
$suffix = if ($IsWindows) { '.exe' } else { '' }
return "./console-app/bin/Release/$framework/$rid/publish/console-app$suffix"
}

function publishConsoleApp([bool]$SentryNative = $true)
Expand Down
23 changes: 2 additions & 21 deletions scripts/build-sentry-native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,11 @@ try
$actualBuildDir = "$buildDir/RelWithDebInfo"
$libPrefix = ''
$libExtension = '.lib'

if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
{
$outDir += '/win-arm64'
}
else
{
$outDir += '/win-x64'
}
$outDir += '/' + [System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier
}
elseif ($IsLinux)
{
if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
{
$outDir += '/linux-arm64'
}
elseif ((ldd --version 2>&1) -match 'musl')
{
$outDir += '/linux-musl-x64'
}
else
{
$outDir += '/linux-x64'
}
$outDir += '/' + [System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier
}
else
{
Expand Down