Skip to content

Tests: further improve Windows compatibility#519

Merged
swissspidy merged 11 commits intomainfrom
fix/windows-tests
Apr 17, 2026
Merged

Tests: further improve Windows compatibility#519
swissspidy merged 11 commits intomainfrom
fix/windows-tests

Conversation

@swissspidy
Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions bot added the scope:testing Related to testing label Apr 15, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces several shell-specific commands, such as pwd, mkdir, and subshells, with wp eval calls and multi-step Behat instructions to improve cross-platform compatibility. The review feedback identifies several critical issues: potential syntax errors due to backslash escaping in shell commands, shell execution failures when handling multi-line output stored in variables, and the lack of exit code propagation when using wp eval for file system operations like mkdir. Additionally, improvements were suggested for the readability of quoted strings within the PHP snippets.

Comment thread features/plugin-install.feature Outdated
Comment thread features/plugin-list-recently-active.feature Outdated
Comment thread features/theme-update.feature Outdated
Comment thread features/theme.feature Outdated
Comment thread features/theme.feature Outdated
@swissspidy swissspidy changed the title Tests: improve Windows compatibility Tests: further improve Windows compatibility Apr 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy marked this pull request as ready for review April 15, 2026 16:45
@swissspidy swissspidy requested a review from a team as a code owner April 15, 2026 16:45
Copilot AI review requested due to automatic review settings April 15, 2026 16:45
@swissspidy swissspidy added this to the 2.3.3 milestone Apr 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Behat feature specs for the extension-command package to reduce reliance on non-portable shell behavior, improving test execution on Windows.

Changes:

  • Replace several shell-quoting-sensitive wp eval '...' invocations with Windows-friendlier quoting.
  • Replace some filesystem shell checks/commands (test -d, mkdir, pwd) with equivalent wp eval/PHP logic.
  • Skip a handful of scenarios on Windows where the steps depend on non-portable tooling (chmod, sed, command substitution).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
features/theme.feature Adjusts eval quoting and replaces directory existence check / mkdir with wp eval for better Windows portability.
features/theme-update.feature Replaces .git directory creation with wp eval to avoid shell mkdir differences.
features/plugin.feature Adjusts eval quoting and replaces directory existence check with wp eval for better Windows portability.
features/plugin-update.feature Adds @skip-windows tags for non-portable scenarios; replaces .git creation with wp eval.
features/plugin-list-recently-active.feature Adds @skip-windows for scenarios relying on shell substitution/newline behavior.
features/plugin-install.feature Replaces pwd with wp eval + getcwd() and normalizes path separators for Windows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread features/theme-update.feature Outdated
Comment thread features/plugin-update.feature Outdated
Comment thread features/plugin-update.feature Outdated
swissspidy and others added 3 commits April 15, 2026 18:57
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@swissspidy swissspidy merged commit d86e3e9 into main Apr 17, 2026
62 checks passed
@swissspidy swissspidy deleted the fix/windows-tests branch April 17, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants