Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export WPT_SSH_PRIVATE_KEY_BASE64=""
# Whether to enable debug Mode.
#
# Enabling debug mode will output verbose logging and details about each part
# of the test runner.
# of the test runner. It also runs npm install and build commands with
# --loglevel=silly during preparation.
#
# 0 = Debug mode off
# 1 = Debug mode on
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export WPT_SSH_OPTIONS=""
export WPT_SSH_PRIVATE_KEY_BASE64=""

# Output logging
# Use 'verbose' to increase verbosity
# Use 'verbose' to increase verbosity; also runs npm with --loglevel=silly
export WPT_DEBUG=""

# Certificate validation
Expand Down Expand Up @@ -390,7 +390,7 @@ export WPT_SSH_PRIVATE_KEY_BASE64=""

**Output logging**

Output logging. Use 'verbose' to increase verbosity.
Output logging. Use 'verbose' to increase verbosity. When set, the npm install and build commands during preparation also run with `--loglevel=silly`.

```
export WPT_DEBUG=""
Expand Down
7 changes: 6 additions & 1 deletion prepare.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
* - Clones the WordPress/wordpress-develop repository from GitHub.
* - Install npm dependencies and run the build script.
*/
// When debug mode is enabled, run npm at its most verbose logging level, so a
// hung or slow npm command shows what it is doing instead of sitting silent.
// The same debug mode adds verbosity to the rsync operations further down.
$npm_verbosity = $runner_vars['WPT_DEBUG'] ? ' --loglevel=silly' : '';

// Prepare an array of shell commands to set up the testing environment.
perform_operations(
array(
Expand All @@ -96,7 +101,7 @@
'git clone --depth=1 https://github.com/WordPress/wordpress-develop.git ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ),

// Change directory to the preparation directory, install npm dependencies, and build the project.
'cd ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ) . '; npm install && npm run build',
'cd ' . escapeshellarg( $runner_vars['WPT_PREPARE_DIR'] ) . '; npm install' . $npm_verbosity . ' && npm run build' . $npm_verbosity,

)
);
Expand Down
Loading