Skip to content

Conversation

@thomhurst
Copy link
Owner

Summary

  • Run built executable directly instead of dotnet run --no-build in engine tests, eliminating the dotnet CLI process startup and project resolution overhead on every test invocation
  • Remove SingleFileApplication test mode — AOT already covers trimming coverage, so this was redundant
  • Remove "Publish Single File" CI step — no longer needed, saving CI build time

Test plan

  • Verify engine tests pass for SourceGenerated and Reflection modes (now using direct executable)
  • Verify AOT mode still works in CI
  • Verify CI pipeline no longer publishes SingleFile artifact

🤖 Generated with Claude Code

Run the built TUnit.TestProject executable directly instead of going
through `dotnet run --no-build`, eliminating CLI overhead on every
engine test invocation.

Remove SingleFileApplication test mode since AOT already covers
trimming coverage, saving both CI build time and test execution time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

This is a well-executed performance optimization that aligns with TUnit's "Performance First" principle. The changes eliminate the dotnet CLI overhead by running compiled test executables directly, while simultaneously removing redundant test infrastructure (SingleFile mode). The implementation is clean and complete - all references to the removed test mode have been properly cleaned up across the codebase and CI configuration.

@thomhurst thomhurst enabled auto-merge (squash) February 10, 2026 14:20
@claude
Copy link
Contributor

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

This PR represents a solid performance optimization that aligns well with TUnit's "Performance First" principle. The changes:

Performance improvement: Running test executables directly eliminates the overhead of the dotnet run CLI wrapper, which involves process startup, project resolution, and framework resolution on every test invocation.

Code cleanup: Removing the SingleFileApplication test mode is reasonable since AOT testing already provides trimming coverage. This reduces redundant test execution and CI time without losing coverage quality.

Consistent patterns: The executable discovery logic in RunWithoutAot follows the same pattern already established in ExternalCancellationTests.cs, handling both Linux (extensionless executables) and Windows (.exe extension) correctly.

Clean refactoring: All references to SingleFileApplication are consistently removed across enums, switch expressions, test methods, and CI workflow.

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.

1 participant