From d9b3bb0f87e98bf36daa60d45970957d7073b3ab Mon Sep 17 00:00:00 2001 From: Tony Levi Date: Mon, 16 Mar 2015 16:28:25 +1030 Subject: [PATCH] MDL-49531 behat: Fix parallel runner with extraopts --- admin/tool/behat/cli/run.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/tool/behat/cli/run.php b/admin/tool/behat/cli/run.php index c83259f1d8b..92c393c49de 100644 --- a/admin/tool/behat/cli/run.php +++ b/admin/tool/behat/cli/run.php @@ -128,7 +128,7 @@ array_walk($unrecognised, function (&$v) { $v = escapeshellarg($v); } }); -$extraopts = implode(' ', $unrecognised); +$extraopts = $unrecognised; $tags = ''; @@ -139,10 +139,10 @@ if ($options['profile']) { exit(1); } $tags = $CFG->behat_config[$profile]['filters']['tags']; - $extraopts .= '--profile=\'' . $profile . "'"; + $extraopts[] = '--profile=\'' . $profile . "'"; } else if ($options['tags']) { $tags = $options['tags']; - $extraopts .= '--tags="' . $tags . '"'; + $extraopts[] = '--tags="' . $tags . '"'; } // Update config file if tags defined. @@ -166,6 +166,7 @@ if ($tags) { } $cmds = array(); +$extraopts = implode(' ', $extraopts); echo "Running " . ($options['torun'] - $options['fromrun'] + 1) . " parallel behat sites:" . PHP_EOL; for ($i = $options['fromrun']; $i <= $options['torun']; $i++) {