MDL-55986 behat: Added option to optimize parallel runs by tags
run.php should only be used for running behat before this patch if tags were passed, then behat.yml was being re-written with features havings tags. As this is not ideal, this option is now removed and features with tags will be optimally split by init.php when --optimize-run option is passed
This commit is contained in:
@@ -57,6 +57,7 @@ list($options, $unrecognized) = cli_get_params(
|
||||
'fromrun' => 1,
|
||||
'torun' => 0,
|
||||
'run-with-theme' => false,
|
||||
'optimize-runs' => '',
|
||||
),
|
||||
array(
|
||||
'h' => 'help',
|
||||
@@ -80,8 +81,9 @@ Options:
|
||||
--diag Get behat test environment status code
|
||||
--updatesteps Update feature step file.
|
||||
|
||||
-j, --parallel Number of parallel behat run operation
|
||||
-m, --maxruns Max parallel processes to be executed at one time.
|
||||
-j, --parallel Number of parallel behat run operation
|
||||
-m, --maxruns Max parallel processes to be executed at one time.
|
||||
--optimize-runs Split features with specified tags in all parallel runs.
|
||||
--run-with-theme Run all core features with specified theme.
|
||||
|
||||
-h, --help Print out this help
|
||||
@@ -185,7 +187,7 @@ if ($options['diag'] || $options['enable'] || $options['disable']) {
|
||||
$CFG->behatrunprocess = $i;
|
||||
|
||||
// Update config file for each run.
|
||||
behat_config_manager::update_config_file('', true, '', $options['run-with-theme'],
|
||||
behat_config_manager::update_config_file('', true, $options['optimize-runs'], $options['run-with-theme'],
|
||||
$options['parallel'], $i);
|
||||
}
|
||||
unset($CFG->behatrunprocess);
|
||||
@@ -267,7 +269,7 @@ function commands_to_execute($options) {
|
||||
if ($options[$option]) {
|
||||
$extra .= " --$option";
|
||||
if ($value) {
|
||||
$extra .= "=$value";
|
||||
$extra .= "='$value'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user