Merge branch 'MDL-67687-master-2' of git://github.com/andrewnicols/moodle into master

This commit is contained in:
Eloy Lafuente (stronk7)
2020-08-06 00:59:15 +02:00
11 changed files with 297 additions and 2 deletions
+6 -1
View File
@@ -49,6 +49,7 @@ list($options, $unrecognized) = cli_get_params(
'torun' => 0,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
),
array(
'j' => 'parallel',
@@ -71,6 +72,7 @@ Options:
-m, --maxruns Max parallel processes to be executed at one time.
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--axe Include axe accessibility tests
-o, --optimize-runs Split features with specified tags in all parallel runs.
-a, --add-core-features-to-theme Add all core features to specified theme's
@@ -102,7 +104,10 @@ if ($options['parallel'] && $options['parallel'] > 1) {
}
} else {
// Only sanitize options for single run.
$cmdoptionsforsinglerun = array('add-core-features-to-theme');
$cmdoptionsforsinglerun = [
'add-core-features-to-theme',
'axe',
];
foreach ($cmdoptionsforsinglerun as $option) {
if (!empty($options[$option])) {
+3 -1
View File
@@ -54,6 +54,7 @@ list($options, $unrecognized) = cli_get_params(
'torun' => 0,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
),
array(
'h' => 'help',
@@ -69,7 +70,7 @@ $help = "
Behat utilities to manage the test environment
Usage:
php util.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--help] [--parallel=value [--maxruns=value]]
php util.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--axe|--help] [--parallel=value [--maxruns=value]]
Options:
--install Installs the test environment for acceptance tests
@@ -78,6 +79,7 @@ Options:
--disable Disables test environment
--diag Get behat test environment status code
--updatesteps Update feature step file.
--axe Include axe accessibility tests
-j, --parallel Number of parallel behat run operation
-m, --maxruns Max parallel processes to be executed at one time.
+5
View File
@@ -49,6 +49,7 @@ list($options, $unrecognized) = cli_get_params(
'updatesteps' => false,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
),
array(
'h' => 'help',
@@ -75,6 +76,7 @@ Options:
--disable Disables test environment
--diag Get behat test environment status code
--updatesteps Update feature step file.
--axe Include axe accessibility tests
-o, --optimize-runs Split features with specified tags in all parallel runs.
-a, --add-core-features-to-theme Add all core features to specified theme's
@@ -181,6 +183,9 @@ if ($options['install']) {
behat_config_manager::set_behat_run_config_value('behatsiteenabled', 1);
}
// Define whether to run Behat with axe tests.
behat_config_manager::set_behat_run_config_value('axe', $options['axe']);
// Enable test mode.
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);