Skip to content

ci: fix Windows regression test runner#401

Merged
spe-ciellt merged 3 commits intogerbv:developfrom
SourceParts:ci/windows-tests
Mar 8, 2026
Merged

ci: fix Windows regression test runner#401
spe-ciellt merged 3 commits intogerbv:developfrom
SourceParts:ci/windows-tests

Conversation

@rampageservices
Copy link
Copy Markdown
Contributor

@rampageservices rampageservices commented Mar 8, 2026

Summary

Follow-up to #378. Fixes the remaining cross-platform CI issues from the Windows regression test work.

Changes

  1. Fix xgettext configure-time race (config/CMakeLists.txt)

    • On clean CI checkouts, Gettext_helpers.cmake runs xgettext at configure time, but authors.c/bugs.c don't exist yet (they're generated at build time)
    • Add execute_process() to generate these files at configure time using the same generate_headers.cmake script — pure CMake file() commands, no external tools
    • The build-time add_custom_command stays for incremental rebuilds
  2. Fix IMv7 convert deprecation (test/run_tests.sh)

    • All CI platforms ship ImageMagick v7 where convert, compare, etc. are deprecated in favor of magick subcommands
    • On Windows, bare convert also collides with the Windows convert.exe disk utility
    • Auto-detect IMv7 via command -v magick and prefix all IM tool invocations accordingly
    • convert is a special case — it was merged into magick itself, so it maps to bare magick (not magick convert, which still emits a deprecation warning)
    • Environment variable overrides (IM_COMPARE, etc.) still work

Previous changes (from earlier commits)

  • Add imagemagick:p to the MSYS2 UCRT64 package list in ci.yaml
  • Use PATH instead of LD_LIBRARY_PATH on Windows in test/CMakeLists.txt

Test results

  • 94/105 tests pass on Windows — 11 rendering differences from cairo-win32 vs cairo-xlib (expected, handled by continue-on-error: true)
  • Ubuntu and macOS CI jobs remain unaffected

Test plan

  • Windows CI job runs regression tests without command not found errors
  • 94/105 tests pass on Windows (11 rendering differences expected)
  • Ubuntu and macOS CI jobs remain unaffected
  • No xgettext warnings on clean configure
  • No IMv7 deprecation warnings on any platform

Add mingw-w64-ucrt-x86_64-imagemagick to MSYS2 packages so compare,
composite, and convert are available for the regression test image
diff checks.

Use PATH instead of LD_LIBRARY_PATH on Windows so the test runner
can find libgerbv.dll at runtime.
@rampageservices rampageservices marked this pull request as ready for review March 8, 2026 12:03
Generate authors.c/bugs.c at configure time via execute_process() so
xgettext doesn't fail on clean checkouts where the generated files
don't yet exist.

Auto-detect ImageMagick v7 in run_tests.sh and use "magick <subcommand>"
syntax instead of bare command names. This fixes deprecation warnings on
all CI platforms and avoids the Windows convert.exe collision.
@rampageservices rampageservices marked this pull request as draft March 8, 2026 12:34
@rampageservices rampageservices marked this pull request as ready for review March 8, 2026 12:41
In IMv7 "convert" was merged into "magick" itself — "magick convert"
still works but emits a deprecation warning.  All other tools use
"magick <subcommand>" but convert is the special case where the
subcommand was dropped entirely.
@spe-ciellt spe-ciellt self-assigned this Mar 8, 2026
@spe-ciellt spe-ciellt added the buildsystem Updates to the buildsystem (CMake/CTest/CPack) label Mar 8, 2026
@spe-ciellt
Copy link
Copy Markdown
Contributor

One maintenance note: the execute_process should add COMMAND_ERROR_IS_FATAL ANY so a configure-time failure is reported immediately rather than manifesting as a confusing xgettext error downstream.

I will merge this before release, with or without fix.

@spe-ciellt spe-ciellt merged commit b8a76f7 into gerbv:develop Mar 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildsystem Updates to the buildsystem (CMake/CTest/CPack)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants