Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Jan 29, 2026

Summary

This aims to allow running integration-test.ps1 locally and on the console runner.
The integration test consists of

  • Installing the package
  • Configuring Sentry
  • (New) Copying the native plugin
  • Building
  • (Optionally) Running the smoke test

Implementation

The integration-test.ps1 was originally designed to do what CI does, but locally, using the same scripts. This now extends this to support the manual copying of native libs step. For that reason building and packaging/extracting got stripped out into dev-integration-test.ps1 to still allow for local workflows.

Usage

Local Development

# Standard platforms (macOS, Windows, Linux)
./test/Scripts.Integration.Test/dev-integration-test.ps1 `
    -Platform "macOS" `
    -UnityVersion "2022.3.70f1" `
    -Clean

Integration Test (Phase 1: Building)

# CI / Local Runner
./test/Scripts.Integration.Test/integration-test.ps1 `
    -UnityPath "/path/to/unity" `
    -UnityVersion "2022.3.70f1" `
    -Platform "Switch" `
    -PackagePath "/ci/artifacts/sentry-unity-package" `
    -NativeSDKPath "/ci/artifacts/switch-native-sdk" `
    -SkipTests

#skip-changelog

@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

LogDebug("Project contains Sentry.");
}

var args = CommandLineArguments.Parse();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate command line argument parsing implementations

Low Severity

The new CommandLineArguments.Parse() class in SentrySetup.cs duplicates the existing Builder.ParseCommandLineArguments() method in Builder.cs. Both implementations have identical logic for parsing command line arguments into a Dictionary<string, string>. This introduces maintenance burden since bug fixes or improvements need to be applied to both places.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Set-Content -Path $metaPath -Value $metaContent -NoNewline
}

Write-Host "Successfully copied $($files.Count) file(s) with meta files for platform '$Platform'"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script reports success when zero files copied

Medium Severity

The copy-native-plugins.ps1 script reports "Successfully copied 0 file(s)" when the source directory exists but contains no files. Since this script's purpose is to provide required native plugin files for the Switch build, copying zero files is never valid, yet the script exits successfully. This causes the Unity build to fail later with an unclear error instead of failing immediately with a clear message about missing native files.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants