Make WordPress Core

Opened 6 weeks ago

Closed 4 weeks ago

#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: trunk
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 6 weeks ago.

Download all attachments as: .zip

Change History (13)

6 weeks ago

#1 @atimmer
6 weeks 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
6 weeks 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
6 weeks ago

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

#4 @pbiron
6 weeks ago

Thank you! The patch works fine for me.

#5 @pento
6 weeks ago

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

#6 @pento
6 weeks 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
6 weeks 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
6 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#9 @pento
6 weeks ago

In 44512:

Tests: Revert [44509].

This commit causes Travis to fail.

See #45863.

#10 @pento
6 weeks 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
6 weeks 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
4 weeks 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.