Skip to content
Snippets Groups Projects
Verified Commit aea2e68e authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3465132 by catch, Spokje, nod_: Show test run time by class in run-tests.sh output

(cherry picked from commit cab9c0a9)
parent d3c711f6
Branches
Tags
17 merge requests!10663Issue #3495778: Update phpdoc in FileSaveHtaccessLoggingTest,!10451Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is not translated,!103032838547 Fix punctuation rules for inline label suffix colon with CSS only,!10150Issue #3467294 by quietone, nod_, smustgrave, catch, longwave: Change string...,!10130Resolve #3480321 "Second level menu",!9936Issue #3483087: Check the module:// prefix in the translation server path and replace it with the actual module path,!9933Issue #3394728 by ankondrat4: Undefined array key "#prefix" and deprecated function: explode() in Drupal\file\Element\ManagedFile::uploadAjaxCallback(),!9914Issue #3451136 by quietone, gapple, ghost of drupal past: Improve...,!9882Draft: Issue #3481777 In bulk_form ensure the triggering element is the bulk_form button,!9839Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9815Issue #3480025: There is no way to remove entity cache items,!9757Issue #3478869 Add "All" or overview links to parent links,!9752Issue #3439910 by pooja_sharma, vensires: Fix Toolbar tests that rely on UID1's super user behavior,!9749Issue #3439910 by pooja_sharma, vensires: Fix Toolbar tests that rely on UID1's super user behavior,!9678Issue #3465132 by catch, Spokje, nod_: Show test run time by class in run-tests.sh output,!9578Issue #3304746 by scott_euser, casey, smustgrave: BigPipe cannot handle (GET)...,!9449Issue #3344041: Allow textarea widgets to be used for text (formatted) fields
Pipeline #253712 passed with warnings
Pipeline: drupal

#253716

    ......@@ -816,12 +816,15 @@ function simpletest_script_execute_batch(TestRunResultsStorageInterface $test_ru
    */
    function simpletest_script_run_phpunit(TestRun $test_run, $class) {
    $runner = PhpUnitTestRunner::create(\Drupal::getContainer());
    $start = microtime(TRUE);
    $results = $runner->execute($test_run, $class, $status);
    $time = microtime(TRUE) - $start;
    $runner->processPhpUnitResults($test_run, $results);
    $summaries = $runner->summarizeResults($results);
    foreach ($summaries as $class => $summary) {
    simpletest_script_reporter_display_summary($class, $summary);
    simpletest_script_reporter_display_summary($class, $summary, $time);
    }
    return $status;
    }
    ......@@ -1077,14 +1080,17 @@ function simpletest_script_reporter_init() {
    * The test class name that was run.
    * @param array $results
    * The assertion results using #pass, #fail, #exception, #debug array keys.
    * @param int|null $duration
    * The time taken for the test to complete.
    */
    function simpletest_script_reporter_display_summary($class, $results) {
    function simpletest_script_reporter_display_summary($class, $results, $duration = NULL) {
    // Output all test results vertically aligned.
    // Cut off the class name after 60 chars, and pad each group with 3 digits
    // by default (more than 999 assertions are rare).
    $output = vsprintf('%-60.60s %10s %9s %14s %12s', [
    $output = vsprintf('%-60.60s %10s %5s %9s %14s %12s', [
    $class,
    $results['#pass'] . ' passes',
    isset($duration) ? ceil($duration) . 's' : '',
    !$results['#fail'] ? '' : $results['#fail'] . ' fails',
    !$results['#exception'] ? '' : $results['#exception'] . ' exceptions',
    !$results['#debug'] ? '' : $results['#debug'] . ' messages',
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment