.env.default sets WPT_TEST_DIR to a value that stops a local run
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
.env.default を README の例と比較し、prepare.php の check_required_env() を調べて、ローカルディレクトリの要件を確認してください。WPT_SKIP_DB_CLEANUP と rm -rf の説明を含め、デフォルト値とコメントをドキュメントに記載されたセットアップに合わせて更新してください。データベースの値だけを入力した新しいローカルセットアップで php prepare.php が通り、ファイルが README と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
.env.default sets WPT_PREPARE_DIR="/tmp/wp-test-runner" and WPT_TEST_DIR="wp-test-runner". For a local run (WPT_SSH_CONNECT empty), check_required_env() requires the two to be the same, so a host who follows the README stops at prepare.php.
The copy of .env.default printed in the README shows export WPT_TEST_DIR="/tmp/wp-test-runner", so the README and the real file disagree. The real file is also behind the README in two other places:
WPT_SKIP_DB_CLEANUPis missing. It was added tofunctions.phpand the README in 6538f85 (#337).- The
WPT_RM_TEST_DIR_CMDcomment still saysrm -r. The README copy saysrm -rfand explains why-fis needed (dd6d34e, #336).
To Reproduce
Steps to reproduce the behavior:
cp .env.default .env- Set
WPT_DB_NAME,WPT_DB_USER,WPT_DB_PASSWORDandWPT_DB_HOSTin.env, nothing else. source .envphp prepare.php- See error:
WPT_PREPARE_DIR=/tmp/wp-test-runner WPT_TEST_DIR=wp-test-runner
Error: WPT_TEST_DIR must be the same as WPT_PREPARE_DIR when running locally.
For the other two points:
$ grep -n "SKIP_DB_CLEANUP" .env.default
$ grep -n "rm -r" .env.default
46:# Use if `rm -r` can't be called directly for some reason.
Expected behavior
A copy of .env.default with only the database values filled in works for a local run, as the README describes. .env.default matches the copy printed in the README: export WPT_TEST_DIR="/tmp/wp-test-runner", the WPT_SKIP_DB_CLEANUP entry, and the rm -rf comment.
Screenshots
n/a (command line output above)
Additional context
Tested on master at 1f276b2 with PHP 8.4.27, in the image built from docker/Dockerfile. The hosting handbook also says WPT_TEST_DIR defaults to $WPT_PREPARE_DIR.
AI Assisted: I used an AI assistant to help investigate and draft this; I ran and checked every test and result myself.
- 主要言語
- PHP
- スター
- 77
- フォーク
- 80
- 平均マージ
- 12日 17時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WordPress/phpunit-test-runner のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
WordPress/phpunit-test-runner#364 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
WordPress/phpunit-test-runner#363 ·
メンテナーはふだん 4 日以内に返信
-
The PHP version check in prepare.php still allows PHP 7.2 and 7.3対応中かも @ekamran が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WordPress/phpunit-test-runner#359 ·
メンテナーはふだん 4 日以内に返信
-
make testrunner.sh in host-tools directory対応中かも @iarif4u が 24 日前に担当しました。 オープンContributorDay tooling WCUS26
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WordPress/phpunit-test-runner#260 · コメント 4 件 ·
メンテナーはふだん 4 日以内に返信
-
create host-tools directory in root folder対応中かも @iarif4u が 24 日前に担当しました。 オープンContributorDay tooling WCUS26
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
WordPress/phpunit-test-runner#259 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
WordPress/phpunit-test-runner の issue をすべて見る
似ている issue
-
Add TuneIn-DirMon in the bot list対応中かも @liviuconcioiu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
matomo-org/device-detector#8424 ·
メンテナーはふだん 1 日以内に返信
-
affecting 5.2 only affecting 5.3 only bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
moodle-an-hochschulen/moodle-theme_boost_union#1463 ·
メンテナーはふだん 1 日以内に返信
-
Course help wanted Sensei
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
woocommerce/woocommerce-paypal-payments#4838 ·
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信