comparison core/scripts/run-tests.sh @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 1fec387a4317
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
302 if you want to also view any pages rendered in the simpletest 302 if you want to also view any pages rendered in the simpletest
303 browser you need to add --verbose to the command line. 303 browser you need to add --verbose to the command line.
304 304
305 --non-html Removes escaping from output. Useful for reading results on the 305 --non-html Removes escaping from output. Useful for reading results on the
306 CLI. 306 CLI.
307
308 --suppress-deprecations
309
310 Stops tests from failing if deprecation errors are triggered.
307 311
308 <test1>[,<test2>[,<test3> ...]] 312 <test1>[,<test2>[,<test3> ...]]
309 313
310 One or more tests to be run. By default, these are interpreted 314 One or more tests to be run. By default, these are interpreted
311 as the names of test groups as shown at 315 as the names of test groups as shown at
367 'keep-results' => FALSE, 371 'keep-results' => FALSE,
368 'keep-results-table' => FALSE, 372 'keep-results-table' => FALSE,
369 'test_names' => array(), 373 'test_names' => array(),
370 'repeat' => 1, 374 'repeat' => 1,
371 'die-on-fail' => FALSE, 375 'die-on-fail' => FALSE,
376 'suppress-deprecations' => FALSE,
372 'browser' => FALSE, 377 'browser' => FALSE,
373 // Used internally. 378 // Used internally.
374 'test-id' => 0, 379 'test-id' => 0,
375 'execute-test' => '', 380 'execute-test' => '',
376 'xml' => '', 381 'xml' => '',
782 $class_name = $test_class; 787 $class_name = $test_class;
783 // Use empty array to run all the test methods. 788 // Use empty array to run all the test methods.
784 $methods = array(); 789 $methods = array();
785 } 790 }
786 $test = new $class_name($test_id); 791 $test = new $class_name($test_id);
792 if ($args['suppress-deprecations']) {
793 putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
794 }
795 else {
796 putenv('SYMFONY_DEPRECATIONS_HELPER=strict');
797 }
787 if (is_subclass_of($test_class, TestCase::class)) { 798 if (is_subclass_of($test_class, TestCase::class)) {
788 $status = simpletest_script_run_phpunit($test_id, $test_class); 799 $status = simpletest_script_run_phpunit($test_id, $test_class);
789 } 800 }
790 else { 801 else {
791 $test->dieOnFail = (bool) $args['die-on-fail']; 802 $test->dieOnFail = (bool) $args['die-on-fail'];
832 if (!empty($args['dburl'])) { 843 if (!empty($args['dburl'])) {
833 $command .= ' --dburl ' . escapeshellarg($args['dburl']); 844 $command .= ' --dburl ' . escapeshellarg($args['dburl']);
834 } 845 }
835 $command .= ' --php ' . escapeshellarg($php); 846 $command .= ' --php ' . escapeshellarg($php);
836 $command .= " --test-id $test_id"; 847 $command .= " --test-id $test_id";
837 foreach (array('verbose', 'keep-results', 'color', 'die-on-fail') as $arg) { 848 foreach (array('verbose', 'keep-results', 'color', 'die-on-fail', 'suppress-deprecations') as $arg) {
838 if ($args[$arg]) { 849 if ($args[$arg]) {
839 $command .= ' --' . $arg; 850 $command .= ' --' . $arg;
840 } 851 }
841 } 852 }
842 // --execute-test and class name needs to come last. 853 // --execute-test and class name needs to come last.