Skip to content

Commit

Permalink
chore: update smoke-test script for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed May 3, 2022
1 parent 4def657 commit 655f900
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
12 changes: 7 additions & 5 deletions scripts/unity-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ function RunUnity([string] $unityPath, [string[]] $arguments, [switch] $ReturnLo
}
else
{
if ($process.ExitCode -ne 0)
{
Throw "Unity exited with code $($process.ExitCode)"
}
return $ReturnLogOutput ? $stdout : $null
break
}
} while ($stopwatch.Elapsed.TotalSeconds -lt $RunUnityLicenseRetryTimeoutSeconds)

if ($process.ExitCode -ne 0)
{
Throw "Unity exited with code $($process.ExitCode)"
}
return $ReturnLogOutput ? $stdout : $null
}

function ClearUnityLog([string] $logFilePath)
Expand Down
15 changes: 13 additions & 2 deletions test/Scripts.Integration.Test/integration-run-smoke-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ if ($Smoke) {

# Native crash test
if ($Crash) {
CrashTestWithServer -SuccessString = "POST /api/12345/minidump/" -CrashTestCallback { RunTest "crash" }
RunTest "has-crashed"
if ($IsMacOS)
{
# Note: macOS apps post the crash on the second app launch, so we must run both as part of the "CrashTestWithServer"
CrashTestWithServer -SuccessString "POST /api/12345/envelope/ HTTP/1.1`" 200 -b'1f8b08000000000000" -CrashTestCallback {
RunTest "crash" "CRASH TEST: Issuing a native crash"
RunTest "has-crashed"
}
}
else
{
CrashTestWithServer -SuccessString = "POST /api/12345/minidump/" -CrashTestCallback { RunTest "crash" }
RunTest "has-crashed"
}
}

0 comments on commit 655f900

Please sign in to comment.