[wp-trac] [WordPress Trac] #44240: Avoid running full PHPUnit test suite for every PHP file change

WordPress Trac noreply at wordpress.org
Thu Jun 7 10:37:36 UTC 2018


#44240: Avoid running full PHPUnit test suite for every PHP file change
------------------------------+---------------------
 Reporter:  jeremyfelt        |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  5.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+---------------------

Comment (by birgire):

 Thanks for the patch @jeremyfelt

 I tested it on a Linux node with:

 {{{
 1) $ grunt watch
 2) $ grunt watch --phpunit --group=privacy
 3) $ grunt watch:phpunit --group=privacy

 }}}

 and it seems to work as expected.

 I tested to change the PHP file {{{/src/wp-admin/includes/user.php}}},
 saved it and then:

 - The first and second copied the file to the {{{/build/wp-
 admin/includes/user.php}}}, but not when running the third one, as
 expected.

 - The first one runs now without PHPUnit tests, as expected.

 - The second and third activate the corresponding PHPUnit test group where
 the {{{tests/phpunit/build/logs/junit.xml}}} file is created or updated
 with relevant {{{<testsuites>}}} info, as expected.

 Not related to this ticket, but I noticed that when I ran the second one
 on a clean dev trunk, I had to resume the (visual) process by pressing
 {{{Enter}}}, might have worked by pressing any key as well? This did not
 happen again, when I tried to replicate.

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


More information about the wp-trac mailing list