Get tests passing on Windows (PR #26668)

18 views
Skip to first unread message

Richard Thomson

unread,
Jul 8, 2026, 5:17:48 PM (yesterday) Jul 8
to wx-...@googlegroups.com, Subscribed

When I tried running the CTest test suite on Windows, I encountered some problems.

These are my proposed fixes to get the tests running again. I used a preset that inherited:

  • with_samples
  • with_tests

and set the Windows generator to Visual Studio 18 2026, then built Release and ran CTest against the Release configuration.

I didn't set any other CMake configuration variables, so I got the defaults for all of those.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26668

Commit Summary

  • d486d9e tests/archive: ignore in-tree zip sample for external tests
  • 777bd0b tests/drawing: tolerate missing generated drawing references
  • f5f02bd tests/filename: skip unwritable documents temp-file case
  • 6c2b177 tests/graphics: compare restored font attributes directly
  • 1d5d886 tests/intl: isolate translation catalog tests

File Changes

(7 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26668@github.com>

VZ

unread,
6:56 AM (14 hours ago) 6:56 AM
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26668)

Thanks for the fixes, I won't be able to look at them (as well as your other PRs) immediately, but I'll do it in a couple of weeks.

In the meanwhile, just to understand: some of this seems to be specific to having same build directory as source directory, which is a configuration that we actively discourage, but I guess it has to be supported when using MSVS generator. But other changes seem to be unrelated, so it's not clear why are they needed when the tests do pass in the CI builds. I.e. I don't understand why would these failures be specific to CMake+MSVS build?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26668/c4924317950@github.com>

Richard Thomson

unread,
9:40 AM (11 hours ago) 9:40 AM
to wx-...@googlegroups.com, Subscribed
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#26668)

some of this seems to be specific to having same build directory as source directory

For what it's worth I never use the same directory for source and build. My CMake based trees always looks like this:

workspace
    source
    build

I guess it has to be supported when using MSVS generator

The Visual Studio generators are perfectly happy having the build directory and source directory located at arbitrary locations.

tests do pass in the CI builds. I.e. I don't understand why would these failures be specific to CMake+MSVS build?

Yes, I didn't understand the divergence from CI builds either. I will dig into that and comment back on this PR.

As for the other PRs, I'm selecting issues from oldest to newest that a) have no proposed patches or implementation fixes on the discussion, b) are Windows or generic (so I can test), and c) seem small enough to fix in a single focused commit. We'll see how many I can fix that way :). I won't make any new PRs until the existing ones are reviewed and accepted or rejected.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26668/c4925624575@github.com>

VZ

unread,
9:58 AM (11 hours ago) 9:58 AM
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26668)

The Visual Studio generators are perfectly happy having the build directory and source directory located at arbitrary locations.

Sorry, I don't know why I thought this wasn't the case when I actually have used it like this myself. And I see now that zip.exe is not due to build == source, so please just ignore/forget everything I wrote.

Anyhow, as I also wrote, this will unfortunately have to wait for a week or two, but I'll get back to it as soon as I can.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26668/c4925799405@github.com>

Richard Thomson

unread,
10:07 AM (11 hours ago) 10:07 AM
to wx-...@googlegroups.com, Subscribed
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#26668)

Short answer: CI is not running my build.

My local build is: Visual Studio 18 2026, wxBUILD_SAMPLES=ALL, wxBUILD_TESTS=ALL, ctest -C Release.

The closest GitHub CMake MSW job is: Ninja, wxBUILD_SAMPLES=SOME, wxBUILD_TESTS=CONSOLE_ONLY, ctest -C Debug -E test_drawing.

Its log ran only one CTest test: test_base. So most failures in PR #26668 are outside that CI surface.

  • archive/zip: local CMake ALL samples puts zip.exe beside test_base.exe; CI CMake uses SOME, so no sample zip.exe collision.
  • drawing: explicitly excluded by -E test_drawing.
  • intl: local CMake ALL samples copies sample internat.mo catalogs into the same output tree; CI CMake SOME does not build/copy internat.
  • filename: my Documents dir is unwritable in that test case; CI runner's Documents dir is writable.
  • clipper/clippingbox: these are in test_gui; GitHub CMake wxMSW uses CONSOLE_ONLY, so it does not add/run test_gui. Other MSW CI runs project-file test_gui.exe, not my CMake output layout, and the font equality failure is environment/backend sensitive.

AppVeyor's CMake path is closer, but still uses wxBUILD_SAMPLES=SOME and excludes test_drawing.

To reproduce this class in CI, add/run a Windows CMake job with Visual Studio 18 2026, wxBUILD_SAMPLES=ALL, wxBUILD_TESTS=ALL, and ctest -C Release without excluding test_drawing.

I honestly don't think the VS 2026 vs. VS 2022 vs. Ninja matters at all here, but it is a difference between CI and my local build.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26668/c4925882381@github.com>

Richard Thomson

unread,
10:08 AM (11 hours ago) 10:08 AM
to wx-...@googlegroups.com, Subscribed
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#26668)

Anyhow, as I also wrote, this will unfortunately have to wait for a week or two, but I'll get back to it as soon as I can.

No worries; I understand completely. I won't "drown you in PRs". I'll wait until this first batch have been processed before submitting anything more.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26668/c4925900201@github.com>

Reply all
Reply to author
Forward
0 new messages