Make WordPress Core

Changeset 44536


Ignore:
Timestamp:
01/10/2019 02:18:19 AM (6 years ago)
Author:
pento
Message:

Tests: Add support for a WP_TESTS_SKIP_INSTALL environment variable.

Defining WP_TESTS_SKIP_INSTALL=1 when running tests will skip the install step. While this shouldn't be used for full test runs, it's useful for saving time when running small groups of tests.

Props soulseekah.
Fixes #43432.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r44534 r44536  
    7777}
    7878
    79 system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );
    80 if ( 0 !== $retval ) {
    81     exit( $retval );
     79if ( '1' !== getenv( 'WP_TESTS_SKIP_INSTALL' ) ) {
     80    system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval );
     81    if ( 0 !== $retval ) {
     82        exit( $retval );
     83    }
    8284}
    8385
Note: See TracChangeset for help on using the changeset viewer.