Skip to content

Fix environment-dependent path and locale in split comparison tests#201

Merged
javiertuya merged 1 commit into
mainfrom
fix-path-inconsistency
Jul 5, 2026
Merged

Fix environment-dependent path and locale in split comparison tests#201
javiertuya merged 1 commit into
mainfrom
fix-path-inconsistency

Conversation

@javiertuya

@javiertuya javiertuya commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Problem

The split comparison tests (TestDotnetTestSplit) were only reproducible in the exact GitHub Actions environment:

  1. Path inconsistency: ReadComparable stripped a base directory computed dynamically from Directory.GetCurrentDirectory() (curDir.Length - 4), while the expected/ fixtures had the CI absolute path (/home/runner/work/dotnet-test-split/dotnet-test-split/) baked into their stack traces. These only matched inside that CI path, so the tests failed on any local checkout.
  2. Locale inconsistency (found while running locally on a Spanish Windows): MSTest emits localized assertion/initialization messages using the OS UI culture, so the generated trx did not match the English expected/ fixtures.

🤖 Generated with Claude Code

- Normalize stack-trace source paths anchoring on the TestAssets* project
  folder instead of stripping a dynamically computed / CI-hardcoded base dir,
  so the expected/actual comparison is reproducible in any checkout and OS.
- Force English UI culture (DOTNET_CLI_UI_LANGUAGE=en) when generating the trx
  assets in run-test.bat and CI, so localized framework messages (e.g. MSTest
  asserts) match the expected files independently of the OS language.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@javiertuya javiertuya merged commit caf3aa6 into main Jul 5, 2026
4 checks passed
@javiertuya javiertuya deleted the fix-path-inconsistency branch July 5, 2026 08:21
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