Skip to content

Commit

Permalink
device-test script configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Jan 11, 2024
1 parent 21f9c91 commit 99f3593
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/device-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ param(
[ValidateNotNullOrEmpty()]
[ValidateSet('android', 'ios')] # TODO , 'maccatalyst'
[String] $Platform,
[String] $Configuration = 'Release',

[Switch] $Build,
[Switch] $Run,
Expand All @@ -28,7 +29,7 @@ try
{
$tfm += 'android'
$group = 'android'
$buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/Release/$tfm/android-$arch"
$buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/$Configuration/$tfm/android-$arch"
$arguments = @(
'--app', "$buildDir/io.sentry.dotnet.maui.device.testapp-Signed.apk",
'--package-name', 'io.sentry.dotnet.maui.device.testapp'
Expand All @@ -38,7 +39,7 @@ try
{
$tfm += 'ios'
$group = 'apple'
$buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/Release/$tfm/iossimulator-$arch"
$buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/$Configuration/$tfm/iossimulator-$arch"
$arguments = @(
'--app', "$buildDir/Sentry.Maui.Device.TestApp.app",
'--target', 'ios-simulator-64',
Expand All @@ -49,7 +50,7 @@ try
# {
# $tfm += 'maccatalyst'
# $group = 'apple'
# $buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/Release/$tfm/iossimulator-$arch"
# $buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/$Configuration/$tfm/iossimulator-$arch"
# $arguments = @(
# '--app', "$buildDir/Sentry.Maui.Device.TestApp.app",
# '--launch-timeout', '00:10:00'
Expand All @@ -58,7 +59,7 @@ try

if ($Build)
{
dotnet build -f $tfm -c Release test/Sentry.Maui.Device.TestApp -p:TestNativeAot=$NativeAot
dotnet build -f $tfm -c $Configuration test/Sentry.Maui.Device.TestApp -p:TestNativeAot=$NativeAot
if ($LASTEXITCODE -ne 0)
{
throw 'Failed to build Sentry.Maui.Device.TestApp'
Expand Down

0 comments on commit 99f3593

Please sign in to comment.