Skip to content

run-unit-tests.sh: require a tests/functional folder - #33

Merged
bonelifer merged 1 commit into
mainfrom
require-functional-dir
Oct 19, 2026
Merged

bonelifer merged 1 commit into
mainfrom
require-functional-dir

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

Makes run-unit-tests.sh refuse to run an extension that has no tests/functional folder, and say how to add one (mkdir -p tests/functional && touch tests/functional/.gitkeep).

phpbb-extensions/test-framework runs PHPUnit with phpBB's own .github/phpunit-*.xml, which lists the extension's tests/functional folder. Without it, the PostgreSQL, MySQL, MSSQL and Windows jobs stop with Test directory ".../tests/functional" not found, and the rest of the matrix gets cancelled, even with functional tests turned off. The SQLite and no-database jobs pass, so it's easy to miss until CI runs. phpbbmodders/phpbb-ext-newspage#2 hit this; an empty folder fixed it.

run-unit-tests.sh is meant to run tests the way CI does, so it now stops at the same point, before cloning anything. The help text, phpbb-test-board/README.md and the option tests (2 new checks) cover it.

Of the org's extensions with a phpunit.xml.dist, only phpbbmodders/documentation still has no tests/functional folder. Its database and Windows jobs are switched off, so its CI passes, but this script will refuse it until the folder is added.

Claude ran tests/test-phpbb-test-board.sh (all pass) and ShellCheck, and ran the script on phpbb-ext-newspage, which now has the folder: 158 tests pass.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

🤖 Generated with Claude Code

phpbb-extensions/test-framework runs PHPUnit with phpBB's own
configuration, which lists the extension's tests/functional folder; its
PostgreSQL, MySQL, MSSQL and Windows jobs stop when the folder is
missing. Refuse to run without it, with the command that adds it, so
this shows up before CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 4ab1e0b into main Oct 19, 2026
1 check passed
@bonelifer
bonelifer deleted the require-functional-dir branch October 19, 2026 18:46
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