Skip to content

Commit

Permalink
Update wordpress.mk to configure for plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AMecea committed Aug 10, 2022
1 parent bad84d7 commit 37c6485
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build/makelib/wordpress.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ WP_TESTS_ARCHIVE := $(CACHE_DIR)/wordpress-develop-$(WP_VERSION).tar.gz

$(WP_TESTS_ARCHIVE):
@$(INFO) fetching $(notdir $@) from $(WP_TESTS_DOWNLOAD_URL)
@curl -sLo "$@" "$(WP_TESTS_DOWNLOAD_URL)" || $(FAIL)
@curl -v -sLo "$@" "$(WP_TESTS_DOWNLOAD_URL)" || $(FAIL)
@$(OK) fetching $(notdir $@) from $(WP_TESTS_DOWNLOAD_URL)

$(WP_TESTS_DIR)/src/wp-includes/version.php: $(WP_TESTS_ARCHIVE)
Expand All @@ -59,6 +59,13 @@ $(WP_TESTS_DIR)/src/wp-includes/version.php: $(WP_TESTS_ARCHIVE)
$(WP_TESTS_DIR)/wp-tests-config.php: $(WP_TESTS_CONFIG) $(WP_TESTS_DIR)/src/wp-includes/version.php
@cp $(WP_TESTS_CONFIG) $@

$(WP_TESTS_DIR)/includes: $(WP_TESTS_DIR)
@cp -r $(WP_TESTS_DIR)/tests/phpunit/includes $@

$(WP_TESTS_DIR)/data: $(WP_TESTS_DIR)
@cp -r $(WP_TESTS_DIR)/tests/phpunit/data $@


# add WP_TESTS_DIR env var for running tests
.do.php.test: PHPUNIT:=WP_TESTS_DIR=$(WP_TESTS_DIR) $(PHPUNIT)

Expand Down

0 comments on commit 37c6485

Please sign in to comment.