From 30bc9abda91a8a3dd77f25228b2a4a1058daa90d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 8 Dec 2025 11:55:42 +0100 Subject: [PATCH 01/11] iOS: Add export preset to template --- exports/export_presets.cfg | 263 +++++++++++++++++++++++++++++++++++++ 1 file changed, 263 insertions(+) diff --git a/exports/export_presets.cfg b/exports/export_presets.cfg index 446c5d21..97b87e16 100644 --- a/exports/export_presets.cfg +++ b/exports/export_presets.cfg @@ -218,3 +218,266 @@ permissions/write_sms=false permissions/write_social_stream=false permissions/write_sync_settings=false permissions/write_user_dictionary=false + +[preset.1] + +name="iOS Tests" +platform="iOS" +runnable=false +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +architectures/arm64=true +application/app_store_team_id="APP_STORE_TEAM_ID" +application/export_method_debug=1 +application/code_sign_identity_debug="" +application/code_sign_identity_release="" +application/provisioning_profile_specifier_debug="" +application/provisioning_profile_specifier_release="" +application/export_method_release=0 +application/bundle_identifier="io.sentry.godot.project" +application/signature="" +application/short_version="" +application/version="" +application/additional_plist_content="" +application/icon_interpolation=4 +application/export_project_only=false +application/delete_old_export_files_unconditionally=false +entitlements/increased_memory_limit=false +entitlements/game_center=false +entitlements/push_notifications="Disabled" +entitlements/additional="" +capabilities/access_wifi=false +capabilities/performance_gaming_tier=false +capabilities/performance_a12=false +capabilities/additional=PackedStringArray() +shader_baker/enabled=false +user_data/accessible_from_files_app=false +user_data/accessible_from_itunes_sharing=false +privacy/camera_usage_description="" +privacy/camera_usage_description_localized={} +privacy/microphone_usage_description="" +privacy/microphone_usage_description_localized={} +privacy/photolibrary_usage_description="" +privacy/photolibrary_usage_description_localized={} +privacy/file_timestamp_access_reasons=3 +privacy/system_boot_time_access_reasons=1 +privacy/disk_space_access_reasons=3 +privacy/active_keyboard_access_reasons=0 +privacy/user_defaults_access_reasons=0 +privacy/tracking_enabled=false +privacy/tracking_domains=PackedStringArray() +privacy/collected_data/name/collected=false +privacy/collected_data/name/linked_to_user=false +privacy/collected_data/name/used_for_tracking=false +privacy/collected_data/name/collection_purposes=0 +privacy/collected_data/email_address/collected=false +privacy/collected_data/email_address/linked_to_user=false +privacy/collected_data/email_address/used_for_tracking=false +privacy/collected_data/email_address/collection_purposes=0 +privacy/collected_data/phone_number/collected=false +privacy/collected_data/phone_number/linked_to_user=false +privacy/collected_data/phone_number/used_for_tracking=false +privacy/collected_data/phone_number/collection_purposes=0 +privacy/collected_data/physical_address/collected=false +privacy/collected_data/physical_address/linked_to_user=false +privacy/collected_data/physical_address/used_for_tracking=false +privacy/collected_data/physical_address/collection_purposes=0 +privacy/collected_data/other_contact_info/collected=false +privacy/collected_data/other_contact_info/linked_to_user=false +privacy/collected_data/other_contact_info/used_for_tracking=false +privacy/collected_data/other_contact_info/collection_purposes=0 +privacy/collected_data/health/collected=false +privacy/collected_data/health/linked_to_user=false +privacy/collected_data/health/used_for_tracking=false +privacy/collected_data/health/collection_purposes=0 +privacy/collected_data/fitness/collected=false +privacy/collected_data/fitness/linked_to_user=false +privacy/collected_data/fitness/used_for_tracking=false +privacy/collected_data/fitness/collection_purposes=0 +privacy/collected_data/payment_info/collected=false +privacy/collected_data/payment_info/linked_to_user=false +privacy/collected_data/payment_info/used_for_tracking=false +privacy/collected_data/payment_info/collection_purposes=0 +privacy/collected_data/credit_info/collected=false +privacy/collected_data/credit_info/linked_to_user=false +privacy/collected_data/credit_info/used_for_tracking=false +privacy/collected_data/credit_info/collection_purposes=0 +privacy/collected_data/other_financial_info/collected=false +privacy/collected_data/other_financial_info/linked_to_user=false +privacy/collected_data/other_financial_info/used_for_tracking=false +privacy/collected_data/other_financial_info/collection_purposes=0 +privacy/collected_data/precise_location/collected=false +privacy/collected_data/precise_location/linked_to_user=false +privacy/collected_data/precise_location/used_for_tracking=false +privacy/collected_data/precise_location/collection_purposes=0 +privacy/collected_data/coarse_location/collected=false +privacy/collected_data/coarse_location/linked_to_user=false +privacy/collected_data/coarse_location/used_for_tracking=false +privacy/collected_data/coarse_location/collection_purposes=0 +privacy/collected_data/sensitive_info/collected=false +privacy/collected_data/sensitive_info/linked_to_user=false +privacy/collected_data/sensitive_info/used_for_tracking=false +privacy/collected_data/sensitive_info/collection_purposes=0 +privacy/collected_data/contacts/collected=false +privacy/collected_data/contacts/linked_to_user=false +privacy/collected_data/contacts/used_for_tracking=false +privacy/collected_data/contacts/collection_purposes=0 +privacy/collected_data/emails_or_text_messages/collected=false +privacy/collected_data/emails_or_text_messages/linked_to_user=false +privacy/collected_data/emails_or_text_messages/used_for_tracking=false +privacy/collected_data/emails_or_text_messages/collection_purposes=0 +privacy/collected_data/photos_or_videos/collected=false +privacy/collected_data/photos_or_videos/linked_to_user=false +privacy/collected_data/photos_or_videos/used_for_tracking=false +privacy/collected_data/photos_or_videos/collection_purposes=0 +privacy/collected_data/audio_data/collected=false +privacy/collected_data/audio_data/linked_to_user=false +privacy/collected_data/audio_data/used_for_tracking=false +privacy/collected_data/audio_data/collection_purposes=0 +privacy/collected_data/gameplay_content/collected=false +privacy/collected_data/gameplay_content/linked_to_user=false +privacy/collected_data/gameplay_content/used_for_tracking=false +privacy/collected_data/gameplay_content/collection_purposes=0 +privacy/collected_data/customer_support/collected=false +privacy/collected_data/customer_support/linked_to_user=false +privacy/collected_data/customer_support/used_for_tracking=false +privacy/collected_data/customer_support/collection_purposes=0 +privacy/collected_data/other_user_content/collected=false +privacy/collected_data/other_user_content/linked_to_user=false +privacy/collected_data/other_user_content/used_for_tracking=false +privacy/collected_data/other_user_content/collection_purposes=0 +privacy/collected_data/browsing_history/collected=false +privacy/collected_data/browsing_history/linked_to_user=false +privacy/collected_data/browsing_history/used_for_tracking=false +privacy/collected_data/browsing_history/collection_purposes=0 +privacy/collected_data/search_hhistory/collected=false +privacy/collected_data/search_hhistory/linked_to_user=false +privacy/collected_data/search_hhistory/used_for_tracking=false +privacy/collected_data/search_hhistory/collection_purposes=0 +privacy/collected_data/user_id/collected=false +privacy/collected_data/user_id/linked_to_user=false +privacy/collected_data/user_id/used_for_tracking=false +privacy/collected_data/user_id/collection_purposes=0 +privacy/collected_data/device_id/collected=false +privacy/collected_data/device_id/linked_to_user=false +privacy/collected_data/device_id/used_for_tracking=false +privacy/collected_data/device_id/collection_purposes=0 +privacy/collected_data/purchase_history/collected=false +privacy/collected_data/purchase_history/linked_to_user=false +privacy/collected_data/purchase_history/used_for_tracking=false +privacy/collected_data/purchase_history/collection_purposes=0 +privacy/collected_data/product_interaction/collected=false +privacy/collected_data/product_interaction/linked_to_user=false +privacy/collected_data/product_interaction/used_for_tracking=false +privacy/collected_data/product_interaction/collection_purposes=0 +privacy/collected_data/advertising_data/collected=false +privacy/collected_data/advertising_data/linked_to_user=false +privacy/collected_data/advertising_data/used_for_tracking=false +privacy/collected_data/advertising_data/collection_purposes=0 +privacy/collected_data/other_usage_data/collected=false +privacy/collected_data/other_usage_data/linked_to_user=false +privacy/collected_data/other_usage_data/used_for_tracking=false +privacy/collected_data/other_usage_data/collection_purposes=0 +privacy/collected_data/crash_data/collected=false +privacy/collected_data/crash_data/linked_to_user=false +privacy/collected_data/crash_data/used_for_tracking=false +privacy/collected_data/crash_data/collection_purposes=0 +privacy/collected_data/performance_data/collected=false +privacy/collected_data/performance_data/linked_to_user=false +privacy/collected_data/performance_data/used_for_tracking=false +privacy/collected_data/performance_data/collection_purposes=0 +privacy/collected_data/other_diagnostic_data/collected=false +privacy/collected_data/other_diagnostic_data/linked_to_user=false +privacy/collected_data/other_diagnostic_data/used_for_tracking=false +privacy/collected_data/other_diagnostic_data/collection_purposes=0 +privacy/collected_data/environment_scanning/collected=false +privacy/collected_data/environment_scanning/linked_to_user=false +privacy/collected_data/environment_scanning/used_for_tracking=false +privacy/collected_data/environment_scanning/collection_purposes=0 +privacy/collected_data/hands/collected=false +privacy/collected_data/hands/linked_to_user=false +privacy/collected_data/hands/used_for_tracking=false +privacy/collected_data/hands/collection_purposes=0 +privacy/collected_data/head/collected=false +privacy/collected_data/head/linked_to_user=false +privacy/collected_data/head/used_for_tracking=false +privacy/collected_data/head/collection_purposes=0 +privacy/collected_data/other_data_types/collected=false +privacy/collected_data/other_data_types/linked_to_user=false +privacy/collected_data/other_data_types/used_for_tracking=false +privacy/collected_data/other_data_types/collection_purposes=0 +icons/icon_1024x1024="" +icons/icon_1024x1024_dark="" +icons/icon_1024x1024_tinted="" +icons/settings_58x58="" +icons/settings_58x58_dark="" +icons/settings_58x58_tinted="" +icons/settings_87x87="" +icons/settings_87x87_dark="" +icons/settings_87x87_tinted="" +icons/notification_40x40="" +icons/notification_40x40_dark="" +icons/notification_40x40_tinted="" +icons/notification_60x60="" +icons/notification_60x60_dark="" +icons/notification_60x60_tinted="" +icons/notification_76x76="" +icons/notification_76x76_dark="" +icons/notification_76x76_tinted="" +icons/notification_114x114="" +icons/notification_114x114_dark="" +icons/notification_114x114_tinted="" +icons/spotlight_80x80="" +icons/spotlight_80x80_dark="" +icons/spotlight_80x80_tinted="" +icons/spotlight_120x120="" +icons/spotlight_120x120_dark="" +icons/spotlight_120x120_tinted="" +icons/iphone_120x120="" +icons/iphone_120x120_dark="" +icons/iphone_120x120_tinted="" +icons/iphone_180x180="" +icons/iphone_180x180_dark="" +icons/iphone_180x180_tinted="" +icons/ipad_167x167="" +icons/ipad_167x167_dark="" +icons/ipad_167x167_tinted="" +icons/ipad_152x152="" +icons/ipad_152x152_dark="" +icons/ipad_152x152_tinted="" +icons/ios_128x128="" +icons/ios_128x128_dark="" +icons/ios_128x128_tinted="" +icons/ios_192x192="" +icons/ios_192x192_dark="" +icons/ios_192x192_tinted="" +icons/ios_136x136="" +icons/ios_136x136_dark="" +icons/ios_136x136_tinted="" +icons/app_store_1024x1024="" +icons/app_store_1024x1024_dark="" +icons/app_store_1024x1024_tinted="" +application/targeted_device_family=2 +application/min_ios_version="14.0" +storyboard/image_scale_mode=0 +storyboard/custom_image@2x="" +storyboard/custom_image@3x="" +storyboard/use_custom_bg_color=false +storyboard/custom_bg_color=Color(0, 0, 0, 1) From 319f1a86313e29f8c53b85a5b151f3d74451abfe Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 8 Dec 2025 14:27:07 +0100 Subject: [PATCH 02/11] Add CLI argument parsing from config file Support reading command line arguments from res://launch_params.cfg via a new ConfigFileCLIAdapter class that parses the "cmdline" value from the "launch" section, handling quoted strings properly. --- project/cli/cli_parser.gd | 7 ++- project/cli/config_file_cli_adapter.gd | 55 ++++++++++++++++++++++ project/cli/config_file_cli_adapter.gd.uid | 1 + project/launch_params.cfg | 2 + 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 project/cli/config_file_cli_adapter.gd create mode 100644 project/cli/config_file_cli_adapter.gd.uid create mode 100644 project/launch_params.cfg diff --git a/project/cli/cli_parser.gd b/project/cli/cli_parser.gd index 6da40d5c..7c2eb444 100644 --- a/project/cli/cli_parser.gd +++ b/project/cli/cli_parser.gd @@ -20,7 +20,8 @@ var _commands: Dictionary = {} ## Determines whether the CLI parser should execute based on command-line arguments. static func should_execute() -> bool: return not OS.get_cmdline_user_args().is_empty() \ - or not AndroidCLIAdapter.get_command_argv().is_empty() + or not AndroidCLIAdapter.get_command_argv().is_empty() \ + or not ConfigFileCLIAdapter.get_command_argv().is_empty() ## Registers a new CLI command with the parser. @@ -41,6 +42,10 @@ func check_and_execute_cli() -> bool: if OS.get_name() == "Android": args.append_array(AndroidCLIAdapter.get_command_argv()) + # Read cmdline from config file + var conf_args: PackedStringArray = ConfigFileCLIAdapter.get_command_argv() + args.append_array(conf_args) + if args.is_empty(): return false diff --git a/project/cli/config_file_cli_adapter.gd b/project/cli/config_file_cli_adapter.gd new file mode 100644 index 00000000..2c2cf9fb --- /dev/null +++ b/project/cli/config_file_cli_adapter.gd @@ -0,0 +1,55 @@ +class_name ConfigFileCLIAdapter +extends RefCounted +## Adapter class that reads command line arguments from a configuration file. +## +## Reads from res://launch_params.cfg and parses the "cmdline" value from the "launch" section +## into CLI-style arguments, handling quoted strings properly. + + +## Reads command line arguments from the launch configuration file. +## Returns CLI-style arguments as PackedStringArray, or empty array if config not found. +static func get_command_argv() -> PackedStringArray: + var rv := PackedStringArray() + + var config := ConfigFile.new() + var err: Error = config.load("res://launch_params.cfg") + + if err != OK: + return rv + + var cmdline: String = config.get_value("launch", "cmdline", "") + if cmdline.is_empty(): + return rv + + return _parse_cmdline(cmdline) + + +## Parses a command line string into separate arguments, handling single and double quotes. +static func _parse_cmdline(cmdline: String) -> PackedStringArray: + var rv := PackedStringArray() + var i := 0 + var current_arg := "" + var in_single_quote := false + var in_double_quote := false + + while i < cmdline.length(): + var c := cmdline[i] + + if c == '"' and not in_single_quote: + in_double_quote = not in_double_quote + elif c == "'" and not in_double_quote: + in_single_quote = not in_single_quote + elif c == ' ' and not in_single_quote and not in_double_quote: + if not current_arg.is_empty(): + rv.append(current_arg) + current_arg = "" + else: + current_arg += c + + i += 1 + + # Add the last argument if it exists + if not current_arg.is_empty(): + rv.append(current_arg) + + return rv diff --git a/project/cli/config_file_cli_adapter.gd.uid b/project/cli/config_file_cli_adapter.gd.uid new file mode 100644 index 00000000..4147e4a0 --- /dev/null +++ b/project/cli/config_file_cli_adapter.gd.uid @@ -0,0 +1 @@ +uid://cxr4dprf30euv diff --git a/project/launch_params.cfg b/project/launch_params.cfg new file mode 100644 index 00000000..bd73be13 --- /dev/null +++ b/project/launch_params.cfg @@ -0,0 +1,2 @@ +[launch] +cmdline = "" From 0944872fc9a8666819a4e862ef9d4800e95eee48 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 8 Dec 2025 14:46:56 +0100 Subject: [PATCH 03/11] Use bundleId for iOS in integration tests --- integration_tests/Integration.Tests.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integration_tests/Integration.Tests.ps1 b/integration_tests/Integration.Tests.ps1 index 9b6385be..81e39009 100644 --- a/integration_tests/Integration.Tests.ps1 +++ b/integration_tests/Integration.Tests.ps1 @@ -41,6 +41,8 @@ BeforeAll { if ($script:TestSetup.IsAndroid) { $arguments = ConvertTo-AndroidExtras -Arguments $arguments $execPath = $script:TestSetup.AndroidComponent + } elseif ($script:TestSetup.Platform -match "iOS") { + $execPath = $script:TestSetup.iOSBundleId } $runResult = Invoke-DeviceApp -ExecutablePath $execPath -Arguments $arguments @@ -80,6 +82,7 @@ BeforeAll { Platform = $env:SENTRY_TEST_PLATFORM AndroidComponent = "io.sentry.godot.project/com.godot.game.GodotApp" IsAndroid = ($env:SENTRY_TEST_PLATFORM -in @("Adb", "AndroidSauceLabs")) + iOSBundleId = "io.sentry.godot.project" } # Check executable and arguments From a4e35099353e66135d6c4a62fcc209586a8c4552 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Mon, 8 Dec 2025 20:49:51 +0100 Subject: [PATCH 04/11] Fix passing arguments on iOS --- integration_tests/Integration.Tests.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration_tests/Integration.Tests.ps1 b/integration_tests/Integration.Tests.ps1 index 81e39009..2f430046 100644 --- a/integration_tests/Integration.Tests.ps1 +++ b/integration_tests/Integration.Tests.ps1 @@ -91,6 +91,8 @@ BeforeAll { $script:TestSetup.Executable = $env:GODOT # For running with Godot binary, we need to add these flags... $script:TestSetup.Args += " --disable-crash-handler --headless --path project --" + } else { + $script:TestSetup.Args += " --" } # Validate executable if (-not (Test-Path $script:TestSetup.Executable)) { From 6272db7db02681691584c0e7926722d113259fc1 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 9 Dec 2025 21:53:54 +0100 Subject: [PATCH 05/11] Use kill on iOS because quit() doesn't work --- project/main.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/main.gd b/project/main.gd index 3b4d4394..65412275 100644 --- a/project/main.gd +++ b/project/main.gd @@ -8,7 +8,10 @@ func _ready() -> void: if await cli_commands.check_and_execute_cli(): # Quit if a CLI command was executed - get_tree().quit(cli_commands.exit_code) + if OS.get_name() == "iOS": + OS.kill(OS.get_process_id()) + else: + get_tree().quit(cli_commands.exit_code) elif OS.get_name() in ["Android", "iOS"]: # Continue with mobile UI get_tree().change_scene_to_file.call_deferred("res://mobile.tscn") From 7ed055c993adb4348f959a233f3d14dbbe25a930 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 9 Dec 2025 22:58:14 +0100 Subject: [PATCH 06/11] Ignore flags before -- in Android adapter --- project/cli/android_cli_adapter.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/project/cli/android_cli_adapter.gd b/project/cli/android_cli_adapter.gd index 1d7a7ae9..0439620a 100644 --- a/project/cli/android_cli_adapter.gd +++ b/project/cli/android_cli_adapter.gd @@ -18,6 +18,16 @@ static func get_command_argv() -> PackedStringArray: var key := "arg%d" % i if extras.has(key): rv.append(extras[key]) + + # If rv contains "--", return only the subset after "--" + var separator_index: int = rv.find("--") + if separator_index != -1: + # Print which flags were ignored (everything before "--") + if separator_index > 0: + var ignored_flags = rv.slice(0, separator_index) + print("Ignoring flags passed before '--': ", ignored_flags) + return rv.slice(separator_index + 1) + return rv From 855a31afe4f56d8dbda427a017f485eb93ca2bbf Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Tue, 9 Dec 2025 22:59:25 +0100 Subject: [PATCH 07/11] Minimum changes for integration tests to work on iOS --- integration_tests/Integration.Tests.ps1 | 26 +++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/integration_tests/Integration.Tests.ps1 b/integration_tests/Integration.Tests.ps1 index 2f430046..2fdd9eb6 100644 --- a/integration_tests/Integration.Tests.ps1 +++ b/integration_tests/Integration.Tests.ps1 @@ -42,11 +42,28 @@ BeforeAll { $arguments = ConvertTo-AndroidExtras -Arguments $arguments $execPath = $script:TestSetup.AndroidComponent } elseif ($script:TestSetup.Platform -match "iOS") { - $execPath = $script:TestSetup.iOSBundleId + $execPath = $script:TestSetup.iOSBundleId } $runResult = Invoke-DeviceApp -ExecutablePath $execPath -Arguments $arguments + if ($TestSetup.Platform -match "iOS") { + $outputFile = Get-OutputFilePath "${Action}-godot.log" + Copy-DeviceItem -DevicePath $script:TestSetup.iOSApplicationLogFile -Destination $outputFile + + # Replace runResult.Output with log file contents for iOS + if (Test-Path $outputFile) { + $logContent = Get-Content -Path $outputFile + $runResult = [PSCustomObject]@{ + Output = $logContent + ExitCode = $runResult.ExitCode + ProcessId = $runResult.ProcessId + StartTime = $runResult.StartTime + EndTime = $runResult.EndTime + } + } + } + # Save result to JSON file $runResult | ConvertTo-Json -Depth 5 | Out-File -FilePath (Get-OutputFilePath "${Action}-result.json") @@ -54,7 +71,7 @@ BeforeAll { # NOTE: On Cocoa & Android, crashes are sent during the next app launch. if ( ($Action -eq "crash-capture" -or $runResult.ExitCode -ne 0) -and - $script:TestSetup.Platform -in @("macOS", "Local", "Adb", "AndroidSauceLabs") + $script:TestSetup.Platform -in @("macOS", "Local", "Adb", "AndroidSauceLabs", "iOSSauceLabs") ) { Write-Debug "Running crash-send to ensure crash report is sent..." Write-GitHub "::group::Log of crash-send" @@ -83,6 +100,7 @@ BeforeAll { AndroidComponent = "io.sentry.godot.project/com.godot.game.GodotApp" IsAndroid = ($env:SENTRY_TEST_PLATFORM -in @("Adb", "AndroidSauceLabs")) iOSBundleId = "io.sentry.godot.project" + iOSApplicationLogFile = "@io.sentry.godot.project:documents/logs/godot.log" } # Check executable and arguments @@ -92,7 +110,7 @@ BeforeAll { # For running with Godot binary, we need to add these flags... $script:TestSetup.Args += " --disable-crash-handler --headless --path project --" } else { - $script:TestSetup.Args += " --" + $script:TestSetup.Args += " --" } # Validate executable if (-not (Test-Path $script:TestSetup.Executable)) { @@ -239,7 +257,7 @@ Describe "Platform Integration Tests" { $eventId = Get-EventIds -AppOutput $runResult.Output -ExpectedCount 1 if ($eventId) { - Write-GitHub "::group::Getting event content" + Write-GitHub "::group::Getting event content" $script:runEvent = Get-SentryTestEvent -EventId "$eventId" Write-GitHub "::endgroup::" } From 176fe21fd6a420e30df08d1a44639e3799488f35 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 12:18:47 +0100 Subject: [PATCH 08/11] Use log file override for iOS SauceLabs in integration tests --- integration_tests/Integration.Tests.ps1 | 23 ++++------------------- modules/app-runner | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/integration_tests/Integration.Tests.ps1 b/integration_tests/Integration.Tests.ps1 index 2fdd9eb6..38a937b3 100644 --- a/integration_tests/Integration.Tests.ps1 +++ b/integration_tests/Integration.Tests.ps1 @@ -45,24 +45,9 @@ BeforeAll { $execPath = $script:TestSetup.iOSBundleId } - $runResult = Invoke-DeviceApp -ExecutablePath $execPath -Arguments $arguments - - if ($TestSetup.Platform -match "iOS") { - $outputFile = Get-OutputFilePath "${Action}-godot.log" - Copy-DeviceItem -DevicePath $script:TestSetup.iOSApplicationLogFile -Destination $outputFile - - # Replace runResult.Output with log file contents for iOS - if (Test-Path $outputFile) { - $logContent = Get-Content -Path $outputFile - $runResult = [PSCustomObject]@{ - Output = $logContent - ExitCode = $runResult.ExitCode - ProcessId = $runResult.ProcessId - StartTime = $runResult.StartTime - EndTime = $runResult.EndTime - } - } - } + # Use log file override for iOS SauceLabs, null for other providers (fallback to system logs) + $logFilePath = if ($script:TestSetup.Platform -eq "iOSSauceLabs") { $script:TestSetup.iOSApplicationLogFile } else { $null } + $runResult = Invoke-DeviceApp -ExecutablePath $execPath -Arguments $arguments -LogFilePath $logFilePath # Save result to JSON file $runResult | ConvertTo-Json -Depth 5 | Out-File -FilePath (Get-OutputFilePath "${Action}-result.json") @@ -79,7 +64,7 @@ BeforeAll { if ($script:TestSetup.IsAndroid) { $arguments = ConvertTo-AndroidExtras -Arguments $arguments } - Invoke-DeviceApp -ExecutablePath $execPath -Arguments $arguments + Invoke-DeviceApp -ExecutablePath $execPath -Arguments $arguments -LogFilePath $logFilePath Write-GitHub "::endgroup::" } diff --git a/modules/app-runner b/modules/app-runner index 2f5268c4..7dd6fe1f 160000 --- a/modules/app-runner +++ b/modules/app-runner @@ -1 +1 @@ -Subproject commit 2f5268c4c27d435417cdf1dadc8980126b9bd64f +Subproject commit 7dd6fe1f05a8b2c07c261b624b08a6d801f53b52 From e4fdc3d81535394711f19fece74026255df8c9e4 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 13:43:35 +0100 Subject: [PATCH 09/11] Revert "Add CLI argument parsing from config file" This reverts commit 98416fc94a0e0078f8b18e67e92fbccc5439d79b. --- project/cli/cli_parser.gd | 7 +-- project/cli/config_file_cli_adapter.gd | 55 ---------------------- project/cli/config_file_cli_adapter.gd.uid | 1 - project/launch_params.cfg | 2 - 4 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 project/cli/config_file_cli_adapter.gd delete mode 100644 project/cli/config_file_cli_adapter.gd.uid delete mode 100644 project/launch_params.cfg diff --git a/project/cli/cli_parser.gd b/project/cli/cli_parser.gd index 7c2eb444..6da40d5c 100644 --- a/project/cli/cli_parser.gd +++ b/project/cli/cli_parser.gd @@ -20,8 +20,7 @@ var _commands: Dictionary = {} ## Determines whether the CLI parser should execute based on command-line arguments. static func should_execute() -> bool: return not OS.get_cmdline_user_args().is_empty() \ - or not AndroidCLIAdapter.get_command_argv().is_empty() \ - or not ConfigFileCLIAdapter.get_command_argv().is_empty() + or not AndroidCLIAdapter.get_command_argv().is_empty() ## Registers a new CLI command with the parser. @@ -42,10 +41,6 @@ func check_and_execute_cli() -> bool: if OS.get_name() == "Android": args.append_array(AndroidCLIAdapter.get_command_argv()) - # Read cmdline from config file - var conf_args: PackedStringArray = ConfigFileCLIAdapter.get_command_argv() - args.append_array(conf_args) - if args.is_empty(): return false diff --git a/project/cli/config_file_cli_adapter.gd b/project/cli/config_file_cli_adapter.gd deleted file mode 100644 index 2c2cf9fb..00000000 --- a/project/cli/config_file_cli_adapter.gd +++ /dev/null @@ -1,55 +0,0 @@ -class_name ConfigFileCLIAdapter -extends RefCounted -## Adapter class that reads command line arguments from a configuration file. -## -## Reads from res://launch_params.cfg and parses the "cmdline" value from the "launch" section -## into CLI-style arguments, handling quoted strings properly. - - -## Reads command line arguments from the launch configuration file. -## Returns CLI-style arguments as PackedStringArray, or empty array if config not found. -static func get_command_argv() -> PackedStringArray: - var rv := PackedStringArray() - - var config := ConfigFile.new() - var err: Error = config.load("res://launch_params.cfg") - - if err != OK: - return rv - - var cmdline: String = config.get_value("launch", "cmdline", "") - if cmdline.is_empty(): - return rv - - return _parse_cmdline(cmdline) - - -## Parses a command line string into separate arguments, handling single and double quotes. -static func _parse_cmdline(cmdline: String) -> PackedStringArray: - var rv := PackedStringArray() - var i := 0 - var current_arg := "" - var in_single_quote := false - var in_double_quote := false - - while i < cmdline.length(): - var c := cmdline[i] - - if c == '"' and not in_single_quote: - in_double_quote = not in_double_quote - elif c == "'" and not in_double_quote: - in_single_quote = not in_single_quote - elif c == ' ' and not in_single_quote and not in_double_quote: - if not current_arg.is_empty(): - rv.append(current_arg) - current_arg = "" - else: - current_arg += c - - i += 1 - - # Add the last argument if it exists - if not current_arg.is_empty(): - rv.append(current_arg) - - return rv diff --git a/project/cli/config_file_cli_adapter.gd.uid b/project/cli/config_file_cli_adapter.gd.uid deleted file mode 100644 index 4147e4a0..00000000 --- a/project/cli/config_file_cli_adapter.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cxr4dprf30euv diff --git a/project/launch_params.cfg b/project/launch_params.cfg deleted file mode 100644 index bd73be13..00000000 --- a/project/launch_params.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[launch] -cmdline = "" From 9f6b104d13fc03fa6baefd10501418f67ac7bf6d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 10 Dec 2025 13:44:04 +0100 Subject: [PATCH 10/11] Bump app-runner --- modules/app-runner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/app-runner b/modules/app-runner index 7dd6fe1f..c88f48ce 160000 --- a/modules/app-runner +++ b/modules/app-runner @@ -1 +1 @@ -Subproject commit 7dd6fe1f05a8b2c07c261b624b08a6d801f53b52 +Subproject commit c88f48cea32e203946814d989589f5ed72cdf4e6 From 6d76785dbf7e620c4f4421873aa841566d108410 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 11 Dec 2025 14:50:25 +0100 Subject: [PATCH 11/11] Export scripts as text --- exports/export_presets.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exports/export_presets.cfg b/exports/export_presets.cfg index 97b87e16..a44d17ca 100644 --- a/exports/export_presets.cfg +++ b/exports/export_presets.cfg @@ -237,7 +237,7 @@ encryption_exclude_filters="" seed=0 encrypt_pck=false encrypt_directory=false -script_export_mode=2 +script_export_mode=0 [preset.1.options]