Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 31... Línea 31...
31
 
31
 
32
if (isset($_SERVER['REMOTE_ADDR'])) {
32
if (isset($_SERVER['REMOTE_ADDR'])) {
33
    die(); // No access from web!.
33
    die(); // No access from web!.
Línea -... Línea 34...
-
 
34
}
-
 
35
 
-
 
36
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
-
 
37
// from the normal environment), so in case user has set tne environment variable, disable it.
34
}
38
putenv('BEHAT_CLI=0');
35
 
39
 
36
// Basic functions.
40
// Basic functions.
Línea 37... Línea 41...
37
require_once(__DIR__ . '/../../../../lib/clilib.php');
41
require_once(__DIR__ . '/../../../../lib/clilib.php');
Línea 52... Línea 56...
52
        'updatesteps' => false,
56
        'updatesteps' => false,
53
        'optimize-runs' => '',
57
        'optimize-runs' => '',
54
        'add-core-features-to-theme' => false,
58
        'add-core-features-to-theme' => false,
55
        'axe'         => true,
59
        'axe'         => true,
56
        'scss-deprecations' => false,
60
        'scss-deprecations' => false,
-
 
61
        'no-icon-deprecations' => false,
57
    ),
62
    ),
58
    array(
63
    array(
59
        'h' => 'help',
64
        'h' => 'help',
60
        'o' => 'optimize-runs',
65
        'o' => 'optimize-runs',
61
        'a' => 'add-core-features-to-theme',
66
        'a' => 'add-core-features-to-theme',
Línea 72... Línea 77...
72
 
77
 
73
Usage:
78
Usage:
Línea 74... Línea 79...
74
  php util_single_run.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--help]
79
  php util_single_run.php [--install|--drop|--enable|--disable|--diag|--updatesteps|--help]
75
 
80
 
76
Options:
81
Options:
77
--install           Installs the test environment for acceptance tests
82
--install              Installs the test environment for acceptance tests
78
--drop              Drops the database tables and the dataroot contents
83
--drop                 Drops the database tables and the dataroot contents
79
--enable            Enables test environment and updates tests list
84
--enable               Enables test environment and updates tests list
80
--disable           Disables test environment
85
--disable              Disables test environment
81
--diag              Get behat test environment status code
86
--diag                 Get behat test environment status code
82
--updatesteps       Update feature step file.
87
--updatesteps          Update feature step file.
-
 
88
--no-axe               Disable axe accessibility tests.
Línea 83... Línea 89...
83
--no-axe            Disable axe accessibility tests.
89
--scss-deprecations    Enable SCSS deprecation checks.
84
--scss-deprecations Enable SCSS deprecation checks.
90
--no-icon-deprecations Disable icon deprecation checks.
Línea 85... Línea 91...
85
 
91
 
Línea 113... Línea 119...
113
// Only load CFG from config.php, stop ASAP in lib/setup.php.
119
// Only load CFG from config.php, stop ASAP in lib/setup.php.
114
define('ABORT_AFTER_CONFIG', true);
120
define('ABORT_AFTER_CONFIG', true);
115
require_once(__DIR__ . '/../../../../config.php');
121
require_once(__DIR__ . '/../../../../config.php');
Línea 116... Línea 122...
116
 
122
 
117
// Remove error handling overrides done in config.php.
123
// Remove error handling overrides done in config.php.
118
$CFG->debug = (E_ALL | E_STRICT);
124
$CFG->debug = (E_ALL);
119
$CFG->debugdisplay = 1;
125
$CFG->debugdisplay = 1;
120
error_reporting($CFG->debug);
126
error_reporting($CFG->debug);
121
ini_set('display_errors', '1');
127
ini_set('display_errors', '1');
Línea 192... Línea 198...
192
    behat_config_manager::set_behat_run_config_value('axe', $options['axe']);
198
    behat_config_manager::set_behat_run_config_value('axe', $options['axe']);
Línea 193... Línea 199...
193
 
199
 
194
    // Define whether to run Behat with SCSS deprecation checks.
200
    // Define whether to run Behat with SCSS deprecation checks.
Línea -... Línea 201...
-
 
201
    behat_config_manager::set_behat_run_config_value('scss-deprecations', $options['scss-deprecations']);
-
 
202
 
-
 
203
    // Define whether to run Behat with icon deprecation checks.
195
    behat_config_manager::set_behat_run_config_value('scss-deprecations', $options['scss-deprecations']);
204
    behat_config_manager::set_behat_run_config_value('no-icon-deprecations', $options['no-icon-deprecations']);
196
 
205
 
197
    // Enable test mode.
206
    // Enable test mode.
198
    $timestart = microtime(true);
207
    $timestart = microtime(true);
199
    mtrace('Creating Behat configuration ...', '');
208
    mtrace('Creating Behat configuration ...', '');
Línea 257... Línea 266...
257
 *
266
 *
258
 * @param Process $process process executing update step command.
267
 * @param Process $process process executing update step command.
259
 * @param string $featurestepfile feature step file in which steps will be saved.
268
 * @param string $featurestepfile feature step file in which steps will be saved.
260
 * @return int exitcode.
269
 * @return int exitcode.
261
 */
270
 */
262
function print_update_step_output($process, $featurestepfile) {
271
function print_update_step_output($process, $featurestepfile): int {
263
    $printedlength = 0;
272
    $printedlength = 0;
Línea 264... Línea 273...
264
 
273
 
Línea 265... Línea 274...
265
    echo "Updating steps feature file for parallel behat runs" . PHP_EOL;
274
    echo "Updating steps feature file for parallel behat runs" . PHP_EOL;