Skip to content

Adapt tests for Windows compatibility - #337

Open
GagaLP wants to merge 1 commit into
masterfrom
fix/windows-testing
Open

Adapt tests for Windows compatibility#337
GagaLP wants to merge 1 commit into
masterfrom
fix/windows-testing

Conversation

@GagaLP

@GagaLP GagaLP commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR is a follow-up to PR #336 and fixes several tests to improve Windows support.

The changes affect task, command, and instruction graph printing tests as well as live_executor starvation/active-time tests:

  • The task, command, and instruction graph printing tests compare exact output strings, which depend on the iteration order of std::unordered_map. Since MSVC's standard library uses a different iteration order, these tests fail on Windows even though graph construction is correct. The tests are disabled for now until a more robust graph comparison method is available.
  • The live_executor starvation/active-time test tolerance is now platform-dependent, using 20ms on Windows (where the previous tolerance was too strict) and 10ms on other platforms, instead of increasing the tolerance globally.

@GagaLP
GagaLP requested a review from PeterTh July 14, 2026 16:05
@github-actions

Copy link
Copy Markdown

Check-perf-impact results: (ae6918621b46271c2f10d6eb978fe95d)

❓ No new benchmark data submitted. ❓
Please re-run the microbenchmarks and include the results if your commit could potentially affect performance.

@PeterTh PeterTh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One small change request, looks good otherwise.

Comment thread test/print_graph_tests.cc Outdated
namespace {
#ifdef _WIN32 // Windows' std::unordered_map sorts differently than other standard library implementations, which causes the printed graph to differ. Since the
// tests at the moment rely on exact string matching, we disable them on Windows until we have a better solution.
#define SKIP_UNSUPPORTED() \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a bit more specific, maybe something like SKIP_WIN32_GRAPH_PRINT_UNSUPPORTED.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed the name

@GagaLP
GagaLP force-pushed the fix/windows-testing branch from c77625b to a38b899 Compare August 3, 2026 15:33
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 30828102149

Coverage increased (+0.02%) to 95.085%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 7261
Covered Lines: 7156
Line Coverage: 98.55%
Relevant Branches: 3686
Covered Branches: 3253
Branch Coverage: 88.25%
Branches in Coverage %: Yes
Coverage Strength: 1941965.46 hits per line

💛 - Coveralls

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.

3 participants