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,12 +91,20 @@ $commandoptions = ""; ...@@ -91,12 +91,20 @@ $commandoptions = "";
// If parallel run then use utilparallel. // If parallel run then use utilparallel.
if ($options['parallel'] && $options['parallel'] > 1) { if ($options['parallel'] && $options['parallel'] > 1) {
$utilfile = 'util.php'; $utilfile = 'util.php';
} // 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');
// Sanitize input options, so they can be passed to util. foreach ($cmdoptionsforsinglerun as $option) {
foreach ($options as $option => $value) { if (!empty($options[$option])) {
if ($value) { $commandoptions .= " --$option='$options[$option]'";
$commandoptions .= " --$option='$value'"; }
} }
} }
......
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