Make WordPress Core

#45863 closed defect (bug) (fixed)

Run core unit tests from src again

Reported by: atimmer Owned by: pento
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.1
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


After [44359] we can run WordPress develop from src again, but the restriction for the tests is still in place. Let's get rid of that restriction.

Attachments (1)

45863.diff (1.3 KB) - added by atimmer 21 months ago.

Download all attachments as: .zip

Change History (13)

21 months ago

#1 @atimmer
21 months ago

@johnbillion @schlessera I am not 100% confident about this change, if you have time can you check if this patch makes sense?

#2 @netweb
21 months ago

I think it would be worthwhile maintaining the ability to run the tests from the build directory, including a Travis CI job running from the build directory using the ‘’built’’ source would be beneficial, even more so once E2E tests land.

#3 @atimmer
21 months ago

I think you can still run from build if you change the ABSPATH in wp-tests-config.php.

#4 @pbiron
21 months ago

Thank you! The patch works fine for me.

#5 @pento
21 months ago

  • Milestone changed from Awaiting Review to 5.1
  • Owner set to pento
  • Status changed from new to assigned

#6 @pento
21 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44508:

Build/Tests: Default to running unit tests from src.

This commit also defaults WP-CLI commands to running against src, too.

Props atimmer, pento.
See #44492.
Fixes #45863.

#7 @pento
21 months ago

In 44509:

Build/Tests: Default to running unit tests from src.

This is the actual commit, unlike [44508], which was not.

Props atimmer.
See #44492.
Fixes #45863.

#8 @pento
21 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#9 @pento
21 months ago

In 44512:

Tests: Revert [44509].

This commit causes Travis to fail.

See #45863.

#10 @pento
21 months ago

Travis is failing horribly, see this test output: https://travis-ci.org/WordPress/wordpress-develop/builds/477267171

@atimmer: Can you please investigate?

#11 @pento
21 months ago

In 44534:

Build/Tests: Allow running unit tests from src.

This is a partial recommit of [44509]: it allows running unit tests from src (which is useful), but doesn't make it the default (which Travis is having issues with).

See #45863.

#12 @atimmer
20 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Thinking about this a bit more, I think we can close this now.

Locally, it is possible to run both from src and build. This fulfills the development desire.

Travis always runs from build, that is ok because the only tests where running from src or build matters are tests regarding assets. When testing from build we verify that the eventual assets in the build will be in a state that passes the unit tests.

Note: See TracTickets for help on using tickets.