@@ -22,52 +22,14 @@ Write-Host "# |___/_| |_|\___/|_|\_\___| |_| |___|___/ |_| #"
2222Write-Host " # #"
2323Write-Host " #####################################################"
2424
25- if ($IsIntegrationTest )
26- {
27- $BuildDir = $ (GetNewProjectBuildPath)
28- $ApkFileName = " test.apk"
29- $ProcessName = " com.DefaultCompany.$ ( GetNewProjectName) "
30-
31- if ($Action -eq " Build" )
32- {
33- $buildCallback = {
34- Write-Host " ::group::Gradle build $BuildDir "
35- Push-Location $BuildDir
36- try
37- {
38- MakeExecutable " ./gradlew"
39- & ./ gradlew -- info -- no- daemon assembleRelease | ForEach-Object {
40- Write-Host " $_ "
41- }
42- if (-not $? )
43- {
44- throw " Gradle execution failed"
45- }
46- Copy-Item - Path launcher/ build/ outputs/ apk/ release/ launcher- release.apk - Destination $ApkFileName
47- }
48- finally
49- {
50- Pop-Location
51- Write-Host " ::endgroup::"
52- }
53- }
54-
55- $symbolServerOutput = RunWithSymbolServer - Callback $buildCallback
56- CheckSymbolServerOutput ' Android' $symbolServerOutput $UnityVersion
57- return ;
58- }
59- }
60- else
61- {
62- $BuildDir = " samples/artifacts/builds/Android"
63- $ApkFileName = " IL2CPP_Player.apk"
64- $ProcessName = " io.sentry.samples.unityofbugs"
65- }
25+ $BuildDir = $ (GetNewProjectBuildPath)
26+ $ApkFileName = " test.apk"
27+ $ProcessName = " com.DefaultCompany.$ ( GetNewProjectName) "
6628$TestActivityName = " $ProcessName /com.unity3d.player.UnityPlayerActivity"
6729$FallBackTestActivityName = " $ProcessName /com.unity3d.player.UnityPlayerGameActivity"
6830
69- $_ArtifactsPath = (( Test-Path env:ARTIFACTS_PATH) ? $env: ARTIFACTS_PATH : " ./ $BuildDir / ../test-artifacts/" ) `
70- + $ ( Get-Date - Format " HHmmss " )
31+ $_ArtifactsPath = (Test-Path env:ARTIFACTS_PATH) ? $env: ARTIFACTS_PATH : ( Join-Path $BuildDir " ../test-artifacts/" $ ( Get-Date - Format " HHmmss " ))
32+
7133function ArtifactsPath
7234{
7335 if (-not (Test-Path $_ArtifactsPath ))
@@ -332,8 +294,8 @@ function RunTest([string] $Name, [string] $SuccessString, [string] $FailureStrin
332294 $logCache = ProcessNewLogs - newLogs $newLogs - lastLogCount ([ref ]$lastLogCount ) - logCache $logCache
333295
334296 # The SmokeTester logs "SmokeTester is quitting." in OnApplicationQuit() to reliably inform when tests finish running.
335- # For crash tests, we expect to see a native crash log "terminating with uncaught exception of type char const*" .
336- if (($newLogs | Select-String " SmokeTester is quitting." ) -or ($newLogs | Select-String " terminating with uncaught exception of type char const* " ))
297+ # For crash tests, we're checking for `sentry- native` logging " crash has been captured" to reliably inform when tests finished running .
298+ if (($newLogs | Select-String " SmokeTester is quitting." ) -or ($newLogs | Select-String " crash has been captured " ))
337299 {
338300 Write-Host " Process finished marker detected. Finish waiting for tests to run."
339301 $processFinished = $true
0 commit comments