Unverified Commit b9b47418 authored by Rajesh Taneja's avatar Rajesh Taneja
Browse files

MDL-55986 behat: all options are not valid for single run

Sanitize options which are valid for single run only
parent 2a864ee9
......@@ -91,13 +91,21 @@ $commandoptions = "";
// If parallel run then use utilparallel.
if ($options['parallel'] && $options['parallel'] > 1) {
$utilfile = 'util.php';
}
// Sanitize input options, so they can be passed to util.
foreach ($options as $option => $value) {
// Sanitize all input options, so they can be passed to util.
foreach ($options as $option => $value) {
if ($value) {
$commandoptions .= " --$option='$value'";
}
}
} else {
// Only sanitize options for single run.
$cmdoptionsforsinglerun = array('run-with-theme');
foreach ($cmdoptionsforsinglerun as $option) {
if (!empty($options[$option])) {
$commandoptions .= " --$option='$options[$option]'";
}
}
}
// Changing the cwd to admin/tool/behat/cli.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment