-
-
Notifications
You must be signed in to change notification settings - Fork 12
test: Mobile test runner #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
limbonaut
wants to merge
101
commits into
main
Choose a base branch
from
sentry-godot-mobile-testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,106
−282
Open
Changes from 81 commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
9299f56
Custom test runner, env vars, tests in demo
limbonaut 5f2bf48
Disable hooks
limbonaut 081d363
Bump gdUnit4 to specific commit
limbonaut 325503c
Use in CI
limbonaut dce009e
Explain status codes
limbonaut e8d3015
Handle warnings
limbonaut 38b64ee
Extract formatting functions into Fmt class
limbonaut 0222ed3
Remove mobile basic tests
limbonaut 0325390
Tests: Unset broken context
limbonaut a89e7d0
Deeper stack as example
limbonaut b0b526f
Better suite color
limbonaut 88a1060
Use threads interface on Android, same as Native and Cocoa
limbonaut 2ff5e48
Use threads interface on Android, same as Native and Cocoa
limbonaut 5ab9003
Clean up
limbonaut d531767
Remove debug print
limbonaut 1cd182d
Rename eventAddStackTrace to eventAddThreadStackTrace
limbonaut 65c7052
Fix adding thread twice
limbonaut 6a51669
Fix crashed flag
limbonaut 5f0547c
Simplify exception handling
limbonaut c7b8df8
Remove unnecessary toLongOrNull conversion
limbonaut 47c9a73
Style fix
limbonaut dcb1c37
Read test params from Android intent extras
limbonaut c32df3a
Add script to run tests on Android locally
limbonaut 77f58d0
Update .gitignore
limbonaut c122428
Fix user tests on Android
limbonaut 505e26a
Fix event tests on Android
limbonaut 3fa272d
Fix breadcrumbs test on Android
limbonaut 38f22bb
Merge branch 'ref/threads-android' into sentry-godot-mobile-testing
limbonaut 2109c14
Update .gitignore
limbonaut 2d546d2
Merge branch 'main' into sentry-godot-mobile-testing
limbonaut 9b65eac
Clarify env vars in doc comments
limbonaut ccdc837
Include default tests if specs not provided
limbonaut c6a5faa
Clarify print statement
limbonaut ac83d04
Reset warning counter in test statistics
limbonaut d1f782f
Pretty output
limbonaut 844b62f
Remove leftovers
limbonaut a2c5b93
Handle nulls in intent extras
limbonaut 8c40c35
Add validation for Godot executable
limbonaut 109348b
Refine script
limbonaut 754e0d0
Update run-android-tests.sh
limbonaut 17eb824
Add error handling and retry logic
limbonaut e44c07b
Fix wording in isolated test suites message
limbonaut 7c9b8f5
Fix upper bound in event test
limbonaut 5b27fb5
Adjust exit code
limbonaut 29db578
Adjust test completion wording
limbonaut ea6f36b
Fix SentryLog.set_attribute() not working on Android
limbonaut d780488
Add delay in breadcrumb test for Android
limbonaut e92c15d
Newlines for output readability
limbonaut c314427
Set compat renderer to avoid emulator errors
limbonaut fadbd51
Fix and improve script
limbonaut adb289d
Don't use OS-reserved 126+ return codes
limbonaut 482f518
Clarify comments
limbonaut 6ec9726
Tests: Pass crashes through
limbonaut 4bd567d
Fix crashing on exit on Android
limbonaut e1aa9d7
Merge branch 'main' into sentry-godot-mobile-testing
limbonaut 954312c
Fixes and improvements to the script
limbonaut d8ef114
Fix crashing on exit on Android
limbonaut a5d14fd
Harden logger
limbonaut 11a82cd
Update CHANGELOG.md
limbonaut c354130
Fix order
limbonaut 766781c
Harden AndroidSDK in case of plugin destruction
limbonaut d2bd80d
Merge branch 'fix/android-crash-on-exit' into sentry-godot-mobile-tes…
limbonaut 786dc97
Revert "Harden AndroidSDK in case of plugin destruction"
limbonaut 84131c2
Harden AndroidSDK
limbonaut 0796ccf
Merge branch 'fix/android-crash-on-exit' into sentry-godot-mobile-tes…
limbonaut 17ab4ed
Remove --debug flag from Godot test runs
limbonaut 54758a9
Tweaks
limbonaut 80c18b0
Merge branch 'main' into sentry-godot-mobile-testing
limbonaut 1451d33
Merge branch 'main' into sentry-godot-mobile-testing
limbonaut d6f3c87
WIP android CI setup
limbonaut 57e5f5e
Update .gitignore
limbonaut e747261
Create build version file for gradle project
limbonaut 423a27a
Simplify unzipping
limbonaut 6a3fa80
Simplify CI script
limbonaut 0c1909d
Fix Android export template extraction path
limbonaut 6053032
Create deploy-android-template.sh
limbonaut fc4f62c
Fix variables in deploy script
limbonaut 6a6af24
Update test_android.yml
limbonaut 0ca9114
Verbose flag
limbonaut dc4e093
adb install with -r
limbonaut 8ee160f
Add validation for isolated test suite discovery
limbonaut 93cdca3
Script: Kill app if hanging
limbonaut 98d572b
Allow Android export to fail in CI workflow
limbonaut 3094e3d
enable KVM
limbonaut ff5cad2
Update deploy-android-template.sh
limbonaut 77a9324
Update test_android.yml
limbonaut cdb7070
x86_64
limbonaut a824909
Fix missing export config
limbonaut 719d86d
Try something
limbonaut 49545a9
Re-add Java step
limbonaut 4897a4d
Add retry logic for getting app PID
limbonaut b518fe6
Move Android testing setup into prepare action
limbonaut 10fc159
Change test summary heading to "Final Results"
limbonaut e79122e
Inline Android template deployment script
limbonaut ff0f6ed
Stylistic changes
limbonaut 746ba09
Replace newline escapes with echo in test script
limbonaut 549e826
Corrections
limbonaut f3ded3c
Normalize indentation to spaces in run-android-tests.sh
limbonaut 1be9a28
Improve test script reliability and performance
limbonaut f965520
Update run-android-tests.sh
limbonaut 718535d
Update run-android-tests.sh
limbonaut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,72 @@ | ||
| name: 🧪 Android tests | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test-android: | ||
| name: Export project for Android | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false # don't initialize submodules automatically | ||
|
|
||
| - name: Prepare testing | ||
| uses: ./.github/actions/prepare-testing | ||
| with: | ||
| arch: x86_64 | ||
|
|
||
| - name: Deploy Android build template | ||
| env: | ||
| GODOT_VERSION: 4.5.1-stable | ||
| run: ./scripts/deploy-android-template.sh $GODOT_VERSION | ||
|
|
||
| - name: Set up Java 17 | ||
| uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
|
|
||
| - name: Set up NDK | ||
| uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0 | ||
| with: | ||
| ndk-version: r28b | ||
| link-to-sdk: true | ||
|
|
||
| - name: Export project | ||
| shell: bash | ||
| timeout-minutes: 5 | ||
| env: | ||
| SENTRY_TEST: 1 | ||
| SENTRY_TEST_INCLUDE: "res://test/suites/" | ||
| run: | | ||
| cp exports/export_presets.cfg project/export_presets.cfg | ||
| "$GODOT" --path project/ --headless --export-debug "Android CI" "${GITHUB_WORKSPACE}/exports/android.apk" | ||
|
|
||
| ls -lR exports/ | ||
|
|
||
| - name: Run Android Tests | ||
| uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # [email protected] | ||
| timeout-minutes: 30 | ||
| with: | ||
| api-level: 30 | ||
| target: "google_apis" | ||
| channel: "stable" | ||
| force-avd-creation: true | ||
| disable-animations: true | ||
| disable-spellchecker: true | ||
| emulator-options: > | ||
| -no-window | ||
| -no-snapshot-save | ||
| -gpu swiftshader_indirect | ||
| -noaudio | ||
| -no-boot-anim | ||
| -camera-back none | ||
| -camera-front none | ||
| arch: arm64-v8a | ||
| script: ./scripts/run-android-tests.sh | ||
This file contains hidden or 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 hidden or 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 hidden or 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,220 @@ | ||
| [preset.0] | ||
|
|
||
| name="Android CI" | ||
| platform="Android" | ||
| runnable=false | ||
| advanced_options=true | ||
| 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=0 | ||
|
|
||
| [preset.0.options] | ||
|
|
||
| custom_template/debug="" | ||
| custom_template/release="" | ||
| gradle_build/use_gradle_build=true | ||
| gradle_build/gradle_build_directory="" | ||
| gradle_build/android_source_template="../exports/android_source.zip" | ||
| gradle_build/compress_native_libraries=false | ||
| gradle_build/export_format=0 | ||
| gradle_build/min_sdk="" | ||
| gradle_build/target_sdk="" | ||
| gradle_build/custom_theme_attributes={} | ||
| architectures/armeabi-v7a=false | ||
| architectures/arm64-v8a=true | ||
| architectures/x86=false | ||
| architectures/x86_64=false | ||
limbonaut marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| version/code=1 | ||
| version/name="" | ||
| package/unique_name="io.sentry.godot.project" | ||
| package/name="" | ||
| package/signed=true | ||
| package/app_category=2 | ||
| package/retain_data_on_uninstall=false | ||
| package/exclude_from_recents=false | ||
| package/show_in_android_tv=false | ||
| package/show_in_app_library=true | ||
| package/show_as_launcher_app=false | ||
| launcher_icons/main_192x192="" | ||
| launcher_icons/adaptive_foreground_432x432="" | ||
| launcher_icons/adaptive_background_432x432="" | ||
| launcher_icons/adaptive_monochrome_432x432="" | ||
| graphics/opengl_debug=false | ||
| shader_baker/enabled=false | ||
| xr_features/xr_mode=0 | ||
| gesture/swipe_to_dismiss=false | ||
| screen/immersive_mode=true | ||
| screen/edge_to_edge=false | ||
| screen/support_small=true | ||
| screen/support_normal=true | ||
| screen/support_large=true | ||
| screen/support_xlarge=true | ||
| screen/background_color=Color(0, 0, 0, 1) | ||
| user_data_backup/allow=false | ||
| command_line/extra_args="" | ||
| apk_expansion/enable=false | ||
| apk_expansion/SALT="" | ||
| apk_expansion/public_key="" | ||
| permissions/custom_permissions=PackedStringArray() | ||
| permissions/access_checkin_properties=false | ||
| permissions/access_coarse_location=false | ||
| permissions/access_fine_location=false | ||
| permissions/access_location_extra_commands=false | ||
| permissions/access_media_location=false | ||
| permissions/access_mock_location=false | ||
| permissions/access_network_state=false | ||
| permissions/access_surface_flinger=false | ||
| permissions/access_wifi_state=false | ||
| permissions/account_manager=false | ||
| permissions/add_voicemail=false | ||
| permissions/authenticate_accounts=false | ||
| permissions/battery_stats=false | ||
| permissions/bind_accessibility_service=false | ||
| permissions/bind_appwidget=false | ||
| permissions/bind_device_admin=false | ||
| permissions/bind_input_method=false | ||
| permissions/bind_nfc_service=false | ||
| permissions/bind_notification_listener_service=false | ||
| permissions/bind_print_service=false | ||
| permissions/bind_remoteviews=false | ||
| permissions/bind_text_service=false | ||
| permissions/bind_vpn_service=false | ||
| permissions/bind_wallpaper=false | ||
| permissions/bluetooth=false | ||
| permissions/bluetooth_admin=false | ||
| permissions/bluetooth_privileged=false | ||
| permissions/brick=false | ||
| permissions/broadcast_package_removed=false | ||
| permissions/broadcast_sms=false | ||
| permissions/broadcast_sticky=false | ||
| permissions/broadcast_wap_push=false | ||
| permissions/call_phone=false | ||
| permissions/call_privileged=false | ||
| permissions/camera=false | ||
| permissions/capture_audio_output=false | ||
| permissions/capture_secure_video_output=false | ||
| permissions/capture_video_output=false | ||
| permissions/change_component_enabled_state=false | ||
| permissions/change_configuration=false | ||
| permissions/change_network_state=false | ||
| permissions/change_wifi_multicast_state=false | ||
| permissions/change_wifi_state=false | ||
| permissions/clear_app_cache=false | ||
| permissions/clear_app_user_data=false | ||
| permissions/control_location_updates=false | ||
| permissions/delete_cache_files=false | ||
| permissions/delete_packages=false | ||
| permissions/device_power=false | ||
| permissions/diagnostic=false | ||
| permissions/disable_keyguard=false | ||
| permissions/dump=false | ||
| permissions/expand_status_bar=false | ||
| permissions/factory_test=false | ||
| permissions/flashlight=false | ||
| permissions/force_back=false | ||
| permissions/get_accounts=false | ||
| permissions/get_package_size=false | ||
| permissions/get_tasks=false | ||
| permissions/get_top_activity_info=false | ||
| permissions/global_search=false | ||
| permissions/hardware_test=false | ||
| permissions/inject_events=false | ||
| permissions/install_location_provider=false | ||
| permissions/install_packages=false | ||
| permissions/install_shortcut=false | ||
| permissions/internal_system_window=false | ||
| permissions/internet=false | ||
| permissions/kill_background_processes=false | ||
| permissions/location_hardware=false | ||
| permissions/manage_accounts=false | ||
| permissions/manage_app_tokens=false | ||
| permissions/manage_documents=false | ||
| permissions/manage_external_storage=false | ||
| permissions/master_clear=false | ||
| permissions/media_content_control=false | ||
| permissions/modify_audio_settings=false | ||
| permissions/modify_phone_state=false | ||
| permissions/mount_format_filesystems=false | ||
| permissions/mount_unmount_filesystems=false | ||
| permissions/nfc=false | ||
| permissions/persistent_activity=false | ||
| permissions/post_notifications=false | ||
| permissions/process_outgoing_calls=false | ||
| permissions/read_calendar=false | ||
| permissions/read_call_log=false | ||
| permissions/read_contacts=false | ||
| permissions/read_external_storage=false | ||
| permissions/read_frame_buffer=false | ||
| permissions/read_history_bookmarks=false | ||
| permissions/read_input_state=false | ||
| permissions/read_logs=false | ||
| permissions/read_media_audio=false | ||
| permissions/read_media_images=false | ||
| permissions/read_media_video=false | ||
| permissions/read_media_visual_user_selected=false | ||
| permissions/read_phone_state=false | ||
| permissions/read_profile=false | ||
| permissions/read_sms=false | ||
| permissions/read_social_stream=false | ||
| permissions/read_sync_settings=false | ||
| permissions/read_sync_stats=false | ||
| permissions/read_user_dictionary=false | ||
| permissions/reboot=false | ||
| permissions/receive_boot_completed=false | ||
| permissions/receive_mms=false | ||
| permissions/receive_sms=false | ||
| permissions/receive_wap_push=false | ||
| permissions/record_audio=false | ||
| permissions/reorder_tasks=false | ||
| permissions/restart_packages=false | ||
| permissions/send_respond_via_message=false | ||
| permissions/send_sms=false | ||
| permissions/set_activity_watcher=false | ||
| permissions/set_alarm=false | ||
| permissions/set_always_finish=false | ||
| permissions/set_animation_scale=false | ||
| permissions/set_debug_app=false | ||
| permissions/set_orientation=false | ||
| permissions/set_pointer_speed=false | ||
| permissions/set_preferred_applications=false | ||
| permissions/set_process_limit=false | ||
| permissions/set_time=false | ||
| permissions/set_time_zone=false | ||
| permissions/set_wallpaper=false | ||
| permissions/set_wallpaper_hints=false | ||
| permissions/signal_persistent_processes=false | ||
| permissions/status_bar=false | ||
| permissions/subscribed_feeds_read=false | ||
| permissions/subscribed_feeds_write=false | ||
| permissions/system_alert_window=false | ||
| permissions/transmit_ir=false | ||
| permissions/uninstall_shortcut=false | ||
| permissions/update_device_stats=false | ||
| permissions/use_credentials=false | ||
| permissions/use_sip=false | ||
| permissions/vibrate=false | ||
| permissions/wake_lock=false | ||
| permissions/write_apn_settings=false | ||
| permissions/write_calendar=false | ||
| permissions/write_call_log=false | ||
| permissions/write_contacts=false | ||
| permissions/write_external_storage=false | ||
| permissions/write_gservices=false | ||
| permissions/write_history_bookmarks=false | ||
| permissions/write_profile=false | ||
| permissions/write_secure_settings=false | ||
| permissions/write_settings=false | ||
| permissions/write_sms=false | ||
| permissions/write_social_stream=false | ||
| permissions/write_sync_settings=false | ||
| permissions/write_user_dictionary=false | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.