WordPress.org

Make WordPress Core

Changeset 48847


Ignore:
Timestamp:
08/23/2020 05:22:28 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Update code coverage setup in the phpunit.xml.dist file to point to the build directory.

This makes the configuration consistent with the WP_RUN_CORE_TESTS constant being set to 1 in the same config file.

Additionally, update the list to be in line with the current codebase, excluding the plugins and themes bundled with WordPress core from being considered for code coverage.

Note: If you have a local phpunit.xml file that changes the WP_RUN_CORE_TESTS constant to 0, you should also - in the same file - change the code coverage setup to use the src directory.

Follow-up to [42665], [43311].

Props jrf, mmarco9.
See #50267.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpunit.xml.dist

    r47122 r48847  
    4343    <filter>
    4444        <whitelist addUncoveredFilesFromWhitelist="true">
    45             <directory suffix=".php">src</directory>
     45            <directory suffix=".php">build</directory>
    4646            <exclude>
    4747                <!-- Third party library exclusions. -->
    48                 <directory suffix=".php">src/wp-includes/ID3</directory>
    49                 <directory suffix=".php">src/wp-includes/IXR</directory>
    50                 <directory suffix=".php">src/wp-includes/random_compat</directory>
    51                 <directory suffix=".php">src/wp-includes/Requests</directory>
    52                 <directory suffix=".php">src/wp-includes/SimplePie</directory>
    53                 <directory suffix=".php">src/wp-includes/Text</directory>
     48                <directory suffix=".php">build/wp-includes/ID3</directory>
     49                <directory suffix=".php">build/wp-includes/IXR</directory>
     50                <directory suffix=".php">build/wp-includes/random_compat</directory>
     51                <directory suffix=".php">build/wp-includes/PHPMailer</directory>
     52                <directory suffix=".php">build/wp-includes/Requests</directory>
     53                <directory suffix=".php">build/wp-includes/SimplePie</directory>
     54                <directory suffix=".php">build/wp-includes/sodium_compat</directory>
     55                <directory suffix=".php">build/wp-includes/Text</directory>
    5456
    55                 <file>src/wp-admin/includes/class-ftp*</file>
    56                 <file>src/wp-admin/includes/class-pclzip.php</file>
    57                 <file>src/wp-admin/includes/deprecated.php</file>
    58                 <file>src/wp-admin/includes/ms-deprecated.php</file>
     57                <!-- Plugins and themes. -->
     58                <directory suffix=".php">build/wp-content/</directory>
    5959
    60                 <file>src/wp-includes/atomlib.php</file>
    61                 <file>src/wp-includes/class-IXR.php</file>
    62                 <file>src/wp-includes/class-json.php</file>
    63                 <file>src/wp-includes/class-phpass.php</file>
    64                 <file>src/wp-includes/class-phpmailer.php</file>
    65                 <file>src/wp-includes/class-pop3.php</file>
    66                 <file>src/wp-includes/class-requests.php</file>
    67                 <file>src/wp-includes/class-simplepie.php</file>
    68                 <file>src/wp-includes/class-smtp.php</file>
    69                 <file>src/wp-includes/class-snoopy.php</file>
    70                 <file>src/wp-includes/deprecated.php</file>
    71                 <file>src/wp-includes/ms-deprecated.php</file>
    72                 <file>src/wp-includes/pluggable-deprecated.php</file>
    73                 <file>src/wp-includes/rss.php</file>
     60                <file>build/wp-admin/includes/class-ftp*</file>
     61                <file>build/wp-admin/includes/class-pclzip.php</file>
     62                <file>build/wp-admin/includes/deprecated.php</file>
     63                <file>build/wp-admin/includes/ms-deprecated.php</file>
     64
     65                <file>build/wp-includes/atomlib.php</file>
     66                <file>build/wp-includes/class-IXR.php</file>
     67                <file>build/wp-includes/class-json.php</file>
     68                <file>build/wp-includes/class-phpass.php</file>
     69                <file>build/wp-includes/class-pop3.php</file>
     70                <file>build/wp-includes/class-requests.php</file>
     71                <file>build/wp-includes/class-simplepie.php</file>
     72                <file>build/wp-includes/class-snoopy.php</file>
     73                <file>build/wp-includes/deprecated.php</file>
     74                <file>build/wp-includes/ms-deprecated.php</file>
     75                <file>build/wp-includes/pluggable-deprecated.php</file>
     76                <file>build/wp-includes/rss.php</file>
    7477            </exclude>
    7578        </whitelist>
Note: See TracChangeset for help on using the changeset viewer.