diff 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
line wrap: on
line diff
--- a/core/scripts/run-tests.sh	Fri Feb 23 15:51:18 2018 +0000
+++ b/core/scripts/run-tests.sh	Fri Feb 23 15:52:07 2018 +0000
@@ -305,6 +305,10 @@
   --non-html  Removes escaping from output. Useful for reading results on the
               CLI.
 
+  --suppress-deprecations
+
+              Stops tests from failing if deprecation errors are triggered.
+
   <test1>[,<test2>[,<test3> ...]]
 
               One or more tests to be run. By default, these are interpreted
@@ -369,6 +373,7 @@
     'test_names' => array(),
     'repeat' => 1,
     'die-on-fail' => FALSE,
+    'suppress-deprecations' => FALSE,
     'browser' => FALSE,
     // Used internally.
     'test-id' => 0,
@@ -784,6 +789,12 @@
       $methods = array();
     }
     $test = new $class_name($test_id);
+    if ($args['suppress-deprecations']) {
+      putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
+    }
+    else {
+      putenv('SYMFONY_DEPRECATIONS_HELPER=strict');
+    }
     if (is_subclass_of($test_class, TestCase::class)) {
       $status = simpletest_script_run_phpunit($test_id, $test_class);
     }
@@ -834,7 +845,7 @@
   }
   $command .= ' --php ' . escapeshellarg($php);
   $command .= " --test-id $test_id";
-  foreach (array('verbose', 'keep-results', 'color', 'die-on-fail') as $arg) {
+  foreach (array('verbose', 'keep-results', 'color', 'die-on-fail', 'suppress-deprecations') as $arg) {
     if ($args[$arg]) {
       $command .= ' --' . $arg;
     }