Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-run-webgl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
run: |
$env:SENTRY_TEST_PLATFORM = "WebGL"
$env:SENTRY_TEST_APP = "samples/IntegrationTest/Build"
$env:SENTRY_TEST_UNITY_VERSION = "${{ inputs.unity-version }}"
Invoke-Pester -Path test/IntegrationTest/Integration.Tests.ps1 -CI

- name: Upload test results on failure
Expand Down
7 changes: 7 additions & 0 deletions test/IntegrationTest/CommonTestCases.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ $CommonTestCases = @(
# sets coexist at runtime. The build already fails to compile/link if aliasing
# regresses; this asserts the runtime path too, so a runtime conflict turns the
# build red rather than being swallowed into a log line.

# The DependencyConflict package is not installed on Unity 2021 + WebGL
if ($TestSetup.Platform -eq "WebGL" -and $TestSetup.UnityVersion -like "2021*") {
Set-ItResult -Skipped -Because "DependencyConflict is not installed on Unity 2021 + WebGL"
return
}

$RunResult.Output | Where-Object { $_ -match "DependencyConflict: FAILED" } |
Should -BeNullOrEmpty -Because "the DependencyConflict package threw at runtime - assembly aliasing likely regressed"
$RunResult.Output | Where-Object { $_ -match "DependencyConflict: Dependencies say hi" } |
Expand Down
1 change: 1 addition & 0 deletions test/IntegrationTest/Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ BeforeAll {
# Initialize test parameters
$script:TestSetup = [PSCustomObject]@{
Platform = $script:Platform
UnityVersion = $env:SENTRY_TEST_UNITY_VERSION
Dsn = $env:SENTRY_DSN
AuthToken = $env:SENTRY_AUTH_TOKEN
}
Expand Down
5 changes: 3 additions & 2 deletions test/Scripts.Integration.Test/Scripts/IntegrationTester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using DependencyConflictPackage;
using Sentry;
using Sentry.Unity;
using UnityEngine;
Expand Down Expand Up @@ -39,15 +38,17 @@ private void Awake()
// the build red too instead of being swallowed into a log line.
private void ExerciseConflictingDependencies()
{
#if !(UNITY_WEBGL && !UNITY_2022_1_OR_NEWER)
try
{
var greeting = DependencyConflictPackageClient.SayHiAsync().GetAwaiter().GetResult();
var greeting = DependencyConflictPackage.DependencyConflictPackageClient.SayHiAsync().GetAwaiter().GetResult();
Logger.Log($"DependencyConflict: {greeting}");
}
catch (Exception ex)
{
Logger.LogError($"DependencyConflict: FAILED - {ex}");
}
#endif
}

public void Start()
Expand Down
Loading