[wp-trac] [WordPress Trac] #45863: Run core unit tests from src again

WordPress Trac noreply at wordpress.org
Fri Feb 26 14:08:08 UTC 2021


#45863: Run core unit tests from src again
------------------------------+---------------------
 Reporter:  atimmer           |       Owner:  pento
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  5.1
Component:  Build/Test Tools  |     Version:  5.1
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch         |     Focuses:
------------------------------+---------------------

Comment (by johnbillion):

 In [changeset:"50441" 50441]:
 {{{
 #!CommitTicketReference repository="" revision="50441"
 Build/Test Tools: Switch back to running the PHPUnit test suite against
 the `src` directory instead of `build`.

 Some PHPUnit tests were concerned with the state of files in the `build`
 directory. In order to allow the tests to run without requiring a build to
 be run first, these have been moved into assertions that run after the
 build step (and therefore cause it to fail if they do not pass), or into
 QUnit tests as necessary.

 Various other PHPUnit tests implictly depend on built JavaScript files
 being present. These files are now touched during the test setup to avoid
 PHP warnings if the `build` files are not present.

 The `wp-tests-config-sample.php` file and the GitHub Actions configuration
 have also been changed so `ABSPATH` uses `src` instead of `build`,
 therefore allowing the PHPUnit tests to be run without a build having to
 be run first. This means all new local installations of WordPress will use
 `src` for PHPUnit testing. If you would like to switch your existing
 installation over then change the location of `ABSPATH` in `wp-tests-
 config.php` to point to `src` instead of `build`.

 Props peterwilsoncc, iandunn, gziolo, desroj, johnbillion

 Fixes #51734
 See #45863
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45863#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list