Conversation
| $ApkFileName = "test.apk" | ||
| $ProcessName = "com.DefaultCompany.$(GetNewProjectName)" | ||
|
|
||
| if ($Action -eq "Build") |
There was a problem hiding this comment.
We're no longer building with this script. Building happens in https://github.com/getsentry/sentry-unity/blob/main/.github/workflows/android-smoke-test-build.yml
| $TestActivityName = "$ProcessName/com.unity3d.player.UnityPlayerActivity" | ||
| $FallBackTestActivityName = "$ProcessName/com.unity3d.player.UnityPlayerGameActivity" | ||
|
|
||
| $_ArtifactsPath = ((Test-Path env:ARTIFACTS_PATH) ? $env:ARTIFACTS_PATH : "./$BuildDir/../test-artifacts/") ` |
There was a problem hiding this comment.
This was mixing relative paths ./ with absolute paths $BuildDir. Using Join-Path to resolve this.
| # For crash tests, we expect to see a native crash log "terminating with uncaught exception of type char const*". | ||
| if (($newLogs | Select-String "SmokeTester is quitting.") -or ($newLogs | Select-String "terminating with uncaught exception of type char const*")) | ||
| # For crash tests, we're checking for `sentry-native` logging "crash has been captured" to reliably inform when tests finished running. | ||
| if (($newLogs | Select-String "SmokeTester is quitting.") -or ($newLogs | Select-String "crash has been captured")) |
There was a problem hiding this comment.
Using a log we control (from within sentry-native) so it won't change with different versions.
There was a problem hiding this comment.
This whole script is a utility script to run the scripts used by CI locally.
| Remove-Item -Path $(GetNewProjectBuildPath) -Recurse -Force -Confirm:$false | ||
|
|
||
| ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$UnityPath" -UnityVersion $UnityVersion -Platform $Platform | ||
| & "./scripts/smoke-test-$($Platform -eq 'iOS' ? 'ios' : 'android').ps1" Build -IsIntegrationTest -UnityVersion $UnityVersion |
There was a problem hiding this comment.
we don't need the Android stuff here anymore?
There was a problem hiding this comment.
That script gluing all the scripts together and letting us "run CI locally".
And no, we're not exporting the Gradle project to manually build it on a different runner. We're relying on the Android Dev environment Unity comes with.
Fixes
I'm not exactly sure when or with which version this changes but the crash log switches between
and
Replacing the
withwithdue to.Instead of relying on the exact wording from the logs from somewhere within Unity, we're relying on the ones from
sentry-native(so we can blame ourselves if this breaks in the future).Cleanup
With the separation into workflows in #1989 we're also no longer exporting a Gradle project that we're then building in a dedicated step. The
IsIntegrationTestis a remnant from there.#skip-changelog.